Added optional ::selection
styling for .window-body
children
#197
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR
color-highlight
1 class that can apply::selection
styling based on Windows 98 text highlighting styling.1💭 Reasoning
Adding this styling can ensure that developers and designers can build a more authentic UI based on Windows 98, down to how text highlighting was styled.
📔 Dev Notes
The decision to make
::selection
styling apply thru an optional class was to ensure that a developer would have to consciously choose if they want an area to have W98 selection styling on an element, as there can be significant accessibility impacts2 if done.This also has the benefit of allowing a user of 98.css to choose when and where on a
window-body
element they want the custom highlight styling to occur, as the use oftext-shadow
with this custom highlight styling could make some highlights look off.The foreground and background of this selection styling surpasses WCAG AA and AAA with a contrast ratio of 18.07:13.
Footnotes
Name for class and styling sourced from Windows Interface Guidelines, chapter 13 - Visual Design, page 325 ↩ ↩2
https://developer.mozilla.org/en-US/docs/Web/CSS/::selection#accessibility_concerns ↩
https://webaim.org/resources/contrastchecker/?fcolor=FFFFFF&bcolor=00005E ↩