-
Notifications
You must be signed in to change notification settings - Fork 4.6k
AnglePickerColor: migrate Emotion to style.module #73786
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
base: trunk
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,9 @@ import { isRTL, __ } from '@wordpress/i18n'; | |
| import { Flex, FlexBlock } from '../flex'; | ||
| import { Spacer } from '../spacer'; | ||
| import NumberControl from '../number-control'; | ||
| import { Text } from '../text'; | ||
| import AngleCircle from './angle-circle'; | ||
| import { UnitText } from './styles/angle-picker-control-styles'; | ||
| import styles from './style.module.scss'; | ||
|
|
||
| import type { WordPressComponentProps } from '../context'; | ||
| import type { AnglePickerControlProps } from './types'; | ||
|
|
@@ -48,7 +49,7 @@ function UnforwardedAnglePickerControl( | |
|
|
||
| const classes = clsx( 'components-angle-picker-control', className ); | ||
|
|
||
| const unitText = <UnitText>°</UnitText>; | ||
| const unitText = <Text className={ styles[ 'unit-text' ] }>°</Text>; | ||
|
||
| const [ prefixedUnitText, suffixedUnitText ] = isRTL() | ||
| ? [ unitText, null ] | ||
| : [ null, unitText ]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| @use "@wordpress/base-styles/variables" as *; | ||
| @use "../utils/theme-variables" as *; | ||
|
|
||
| .circle-root { | ||
| border-radius: $radius-round; | ||
| border: $border-width solid $components-color-border; | ||
| box-sizing: border-box; | ||
| cursor: grab; | ||
| height: 32px; | ||
| overflow: hidden; | ||
| width: 32px; | ||
|
|
||
| &:active { | ||
| cursor: grabbing; | ||
| } | ||
| } | ||
|
|
||
| .circle-indicator-wrapper { | ||
| box-sizing: border-box; | ||
| position: relative; | ||
| width: 100%; | ||
| height: 100%; | ||
|
|
||
| &:focus-visible { | ||
| outline: none; | ||
| } | ||
| } | ||
|
|
||
| .circle-indicator { | ||
| background: $components-color-accent; | ||
| border-radius: $radius-round; | ||
| box-sizing: border-box; | ||
| display: block; | ||
| left: 50%; | ||
| top: 4px; | ||
| transform: translateX(-50%); | ||
| position: absolute; | ||
| width: 6px; | ||
| height: 6px; | ||
| } | ||
|
|
||
| .unit-text { | ||
| color: $components-color-accent; | ||
| margin-right: $grid-unit-15; | ||
| } | ||
|
|
This file was deleted.



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.
All the
components-angle-picker-control-*class names are unused, so I removed them.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.
We've been keeping all these for back compat, unfortunately 😅
For example:
gutenberg/packages/components/src/date-time/time/index.tsx
Lines 141 to 143 in b9e9788
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.
OK I brought the class names back 🙂 When they are together with the module classes in one
clsxcall, they suddently start looking very suspicious and redundant 🙂