Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show card resource icons instead of 'RES' in the corner. #3637

Merged
merged 3 commits into from Sep 25, 2021

Conversation

kberg
Copy link
Collaborator

@kberg kberg commented Sep 23, 2021

I don't like copying the CSS. I wonder if less can help here.

image

@kberg
Copy link
Collaborator Author

kberg commented Sep 23, 2021

If the CSS copying can be resolved (or accepted as a copy, eyyuch), this would be good to go.

@kevinb9n
Copy link

kevinb9n commented Sep 23, 2021

Any particular preference for "[Floater]: 5" over "5 [Floater]"?

The first way makes it resemble this just a wee bit

@kberg
Copy link
Collaborator Author

kberg commented Sep 23, 2021

I agree, swapping the order is nicer. Will do.

@kberg
Copy link
Collaborator Author

kberg commented Sep 23, 2021

Done:

image

@kberg kberg requested a review from chosta September 23, 2021 13:25
background-size: 22px;
vertical-align: middle;
}
.card-resource-microbe {
Copy link
Collaborator

@alrusdi alrusdi Sep 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try to reduce code repetition by using lesscss each keyword like this:

@resource_types: microbe, animal, science;

each(@resource_types, {
    .card-resource-@{value} {
        background-image: url("./assets/resources/@{value}.png");
    }
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh neat.

@kevinb9n
Copy link

I love this!

Have you checked that if one of these same cards like Security Fleet is on Self-Rep Robots that it doesn't accidentally show up as being fighter resources in that situation? It should look like blank white squares.

@kberg
Copy link
Collaborator Author

kberg commented Sep 24, 2021

I love this!

Have you checked that if one of these same cards like Security Fleet is on Self-Rep Robots that it doesn't accidentally show up as being fighter resources in that situation? It should look like blank white squares.

I have not checked SRR. I almost never play or test with promos. But it seems worth checking before applying.

@bafolts
Copy link
Collaborator

bafolts commented Sep 25, 2021

This is what gets displayed on the Self Replicating Robot cards.

image

This seems good enough for me for time being. It is at least not showing the fighter resource.

@kberg kberg changed the title prototype: show card resource icons instead of 'RES' in the corner. Show card resource icons instead of 'RES' in the corner. Sep 25, 2021
@kberg
Copy link
Collaborator Author

kberg commented Sep 25, 2021

Yeah, this is looking decent:

image

Copy link
Collaborator Author

@kberg kberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what gets displayed on the Self Replicating Robot cards.

image

This seems good enough for me for time being. It is at least not showing the fighter resource.

Confirmed.

background-size: 22px;
vertical-align: middle;
}
.card-resource-microbe {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh neat.

@kberg
Copy link
Collaborator Author

kberg commented Sep 25, 2021

I removed the "prototype" from the definition because of satisfactory CSS reduction.

@kberg kberg merged commit 8132417 into terraforming-mars:main Sep 25, 2021
@kberg kberg deleted the res branch September 25, 2021 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants