-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Assign default font and font size styles to the notice component #13817
Assign default font and font size styles to the notice component #13817
Conversation
@@ -1,4 +1,6 @@ | |||
.components-notice { | |||
font-family: $default-font; | |||
font-size: $default-font-size; |
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.
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
?
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.
Yeah, definitely might be worth an audit. 👍 I'll merge this in for now though.
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.
Regardless of the more "global" discussion, this LGTM 👍
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: