-
Notifications
You must be signed in to change notification settings - Fork 166
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
Darker rule component #4801
Darker rule component #4801
Conversation
Demo starting at https://vanilla-framework-4801.demos.haus |
Looks good. Can we please add the following example - to indicate it is ok to use the black p-rule as a full-width element: You can take it from my pr here (you'll need to uipdate the classes to what you've specified in the css): |
The non-highlighted For the highlighted one, the contrast is insufficient for graphical elements components on a page https://webaim.org/resources/contrastchecker/?fcolor=000000&bcolor=222222#:~:text=Graphical%20Objects%20and%20User%20Interface%20Components If the black text turns white on a dark background why not turn the |
That's for cases where they carry information, for example a chevron which is the only indication that something is interactive. What we discussed with @bartaz yesterday was to add a theme-agnostic black We may still have a valid case for a white bar and a transparency one, this is why we're not modifying the hr.is-dark styling - that results in a white hr with opacity. Just checked the example, I would expect the classes is-dark and p-rule--highlighted to be possible on the same element in the dark theme. Maybe we can add that @bartaz? |
Dark theme colours: background defaultr: #262626 default dark border is white 0.1 opacity highlight bars are text colour on both themes |
@bartaz can we have a is-thick modifier so we can obtain the semi-transparent version in the thick style? It's the only way I can think of achieving this given the current setup: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done 🚀
scss/_base_hr.scss
Outdated
hr.is-light, | ||
hr.on-light { | ||
@include vf-hr-light-theme; | ||
} | ||
} @else { | ||
hr { | ||
@include vf-hr-light-theme; | ||
} | ||
|
||
hr.is-dark { | ||
hr.is-dark, | ||
hr.on-dark { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have both is
and on
modifiers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to deprecate is-dark
as it's often confusing ("is-dark" rule or icons being white), so "on-dark" makes more sense - they are supposed to be used on dark backgrounds.
I forgot to add deprecation comments and docs.
Ideally later (hopefuly for 4.0 release) I want to revisit other is-theme
class names and do similar change where relevant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So on-dark
is new and should be used is-dark
is needed for backwards compatibility.
Thanks @bartaz I've given +1. Ideally the dark example should use a default 1px line for the left aligned headings, and a muted one for the ones inside, to match the latest design, but fine to go as is if you're pressed for time. |
@lyubomir-popov You may have been looking at the older example, maybe demo was not updated yet, or cached. I deliberately used all versions (thick, default, muted) so we can see them all on dark theme: |
Ah got it, good idea. Thanks for explaining. |
Done
Fixes WD-4564
Fixes WD-4683
Fixes WD-4684
QA
Check if PR is ready for release
If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:
Feature 🎁
,Breaking Change 💣
,Bug 🐛
,Documentation 📝
,Maintenance 🔨
.package.json
should be updated relative to the most recent release, following semver convention: