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

--text-c on other elements #16

Open
yvesh opened this issue Oct 16, 2020 · 2 comments
Open

--text-c on other elements #16

yvesh opened this issue Oct 16, 2020 · 2 comments

Comments

@yvesh
Copy link
Collaborator

yvesh commented Oct 16, 2020

Hey @ciar4n and @C-Lodder,

you can currently set the heading (h1-h6) color with the color class helpers (.white, .blue etc.), but not on other elements. What do you think about extending the list slightly with some inline elements?

At least for me span / b / i and maybe code / mark could make sense, for example <span class="green">Green Text</span>

span, i, /*..*/ {
  color: var(--text-c, inherit);
}

Or how about another class combination like (.accent.primary) for text color (.color.primary)?

Thank you!

@ciar4n
Copy link
Contributor

ciar4n commented Oct 17, 2020

Initially, I wanted to avoid having too many variables however in hindsight this is possibly unavoidable. How would you feel about applying color with the following (currently will not work on all elements)...

Inline with...

<span style="--text-c: var(--custom)">Sample</span>

Or at a stylesheet level to all elements with...

span {
  --text-c: var(--custom);
}

@yvesh
Copy link
Collaborator Author

yvesh commented Oct 23, 2020

Yep, first one is what I currently go for.

Imho you maybe should remove the possibility for heading colors for consistency though than (e.g. <h1 class="green">..</h1>). There should be one preferred way to do things and not multiple (imo - that's why I raised the question).

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

No branches or pull requests

2 participants