-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FontSizePicker: Replace SCSS with Emotion + components (#44483)
* Replace SCSS with Emotion + components * Nuke .components-color-palette__clear * Go back to only using VStack when __nextHasNoMarginBottom is set * Update CHANGELOG.md * Make Reset button always 30px high
- Loading branch information
1 parent
d6f4bb1
commit 02c5684
Showing
5 changed files
with
92 additions
and
121 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import styled from '@emotion/styled'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import BaseControl from '../base-control'; | ||
import Button from '../button'; | ||
import { space } from '../ui/utils/space'; | ||
import { COLORS } from '../utils'; | ||
|
||
export const Container = styled.fieldset` | ||
border: 0; | ||
margin: 0; | ||
padding: 0; | ||
`; | ||
|
||
export const HeaderLabel = styled( BaseControl.VisualLabel )` | ||
margin-bottom: 0; | ||
`; | ||
|
||
export const HeaderHint = styled.span` | ||
color: ${ COLORS.gray[ 700 ] }; | ||
margin-left: ${ space( 1 ) }; | ||
`; | ||
|
||
// 280px is the sidebar width. | ||
// TODO: Remove this, @wordpress/components shouldn't care what a "sidebar" is. | ||
export const Controls = styled.div< { | ||
__nextHasNoMarginBottom: boolean; | ||
} >` | ||
max-width: calc( 280px - ${ space( 4 ) } * 2 ); | ||
${ ( props ) => | ||
! props.__nextHasNoMarginBottom && `margin-bottom: ${ space( 6 ) };` } | ||
`; | ||
|
||
export const ResetButton = styled( Button )` | ||
&&& { | ||
height: 30px; | ||
} | ||
`; |
This file contains 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