Assign default font and font size styles to the notice component#13817
Merged
Assign default font and font size styles to the notice component#13817
Conversation
youknowriad
reviewed
Feb 11, 2019
| @@ -1,4 +1,6 @@ | |||
| .components-notice { | |||
| font-family: $default-font; | |||
| font-size: $default-font-size; | |||
Contributor
There was a problem hiding this comment.
This makes sense to me. I wonder if we should do an audit and do this consistently across our reusable UI components. For example, I also noticed that the block placeholders and the buttons can be altered by editor styles.
Also what properties should we add: font-family, font-size, maybe also color, background and line-height?
Contributor
Author
There was a problem hiding this comment.
Yeah, definitely might be worth an audit. 👍 I'll merge this in for now though.
youknowriad
approved these changes
Feb 11, 2019
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
Regardless of the more "global" discussion, this LGTM 👍
This was referenced Feb 18, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
youknowriad
pushed a commit
that referenced
this pull request
Mar 6, 2019
This was referenced Apr 30, 2020
This was referenced May 1, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Our standard notices all appear using our default sans-serif system font stack, at 13px:
However, these font styles are all inherited. If a notice component is inserted into a custom block, its styles will usually be overridden by the theme's stylesheet:
Notices are a system-level alert, so their styles should not vary based on the user's theme. This PR adds basic font and font size rules to the Notice component to prevent that: