Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Add --paper-card-header-background-color variable #108

Open
MattMS opened this issue Aug 13, 2017 · 3 comments
Open

Add --paper-card-header-background-color variable #108

MattMS opened this issue Aug 13, 2017 · 3 comments

Comments

@MattMS
Copy link

MattMS commented Aug 13, 2017

Would it be possible to add a variable to control the background-color of .header?
This would be similar to --paper-card-header-color or --paper-card-background-color.

My guess would be adding the following to the .header block styles:

background-color: var(--paper-card-header-background-color, var(--primary-background-color));

I am fairly new to Polymer, so I'm a bit hesitant to rush into making a PR myself without clarifying any extra considerations.

@notwaldorf
Copy link
Contributor

Hmm, would this be so that you would have a header image and a header title that would have a background? Do you have an example of how this would look like in action (in my mind it's pretty clunky)

@MattMS
Copy link
Author

MattMS commented Aug 15, 2017

Actually I'm using a paper-card without an image, just a title and a background colour.
I ended up making my own component based on the code here, so I could add an icon beside the title. 😄

I figured out how to get similar functionality with CSS mixins (whatever @apply uses), but it seems to be easier to use CSS variables in Stylus.

This issue was also for me to learn the level of customisation that is acceptable in these components.

@davie-robertson
Copy link

I'm new to this Material design metaphor too and I've been searching for such a property - which led me here.

I also intend to show a list of cards to a user and would ideally like to categorise the cards based on metadata (say 6 or 7 different coloured headers). Each card will contain a few fields of text, an action-area/buttons and an iron-collapse element to expand containing more data.

I guess notwaldorf is right in that it may be clunky and we're bending the design metaphor to fit our needs rather than looking at something like a paper-list with different coloured circles etc. for each category/card, then just expand each of those items on click? I guess that would make things easier to sort for users too.

Sorry of this is the wrong place to post this - but we seem to be looking at the same thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants