-
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
Tooltip (Experimental)
, CustomSelectControl
, TimePicker
: Add missing font sizes styles which were necessary in non-WordPress contexts
#42844
Conversation
Size Change: +27 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
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.
Tested by using the Global CSS switcher:
- on
trunk
, switching from "WordPress (common/forms)" to "Font only" would cause the component's font size to shift - on this PR, the font size stays the same when switching.
Just flagging that, relatively to typography, the line-height
is also different (it can be easily observed in case of the Tooltip
component when using the global CSS with the changes from this PR)
Mmm yeah, the |
@@ -17,7 +17,9 @@ import NumberControl from '../../number-control'; | |||
import SelectControl from '../../select-control'; | |||
import { Select } from '../../select-control/styles/select-control-styles'; | |||
|
|||
export const Wrapper = styled.div``; | |||
export const Wrapper = styled.div` |
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.
It doesn't look like this is used anywhere.
never mind I am a big idiot.
Tooltip (Experimental)
, CustomSelectControl
, TimePicker
: Add missing font sizes styles which were necessary in non-WordPress contexts
Part of #42781
What?
Adds an explicit font size to components that didn't have them.
Why?
#42747 uncovered that some components rely on a
font-size: 13px
being set in the surrounding CSS context. This is not a given, and we need that font-size to be explicitly set in each component for them to be self-sufficient. (See #42781 for further reasoning.)How?
Add a
font-size
declaration to the highest-level wrapper possible, so inheritance can take care of the rest. This way we don't have to over-specify, and will cover any future additions to component internals.Testing Instructions
npm run storybook:dev
Make sure the global CSS injector is set to the "Font only" setting
Check these stories:
Screenshots or screencast