Last active
June 11, 2021 02:15
-
-
Save justintadlock/479210f63ce97f980efd37d6392cf2e9 to your computer and use it in GitHub Desktop.
Moves the "percent" metadata next to the bar for Tiles Progress Bar Block
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
<?php | |
register_block_style( 'tiles/progress', [ | |
'name' => 'percent-side', | |
'label' => 'Percent Side', | |
'inline_style' => ' | |
.wp-block-tiles-progress.is-style-percent-side { | |
line-height: 1; | |
} | |
.wp-block-tiles-progress.is-style-percent-side .wp-block-tiles-progress__background, | |
.wp-block-tiles-progress.is-style-percent-side .wp-block-tiles-progress__foreground { | |
border-radius: 0; | |
height: 2rem; | |
} | |
.wp-block-tiles-progress.is-style-percent-side .wp-block-tiles-progress__background { | |
max-width: calc( 100% - 3em ); | |
} | |
.wp-block-tiles-progress.is-style-percent-side .wp-block-tiles-progress__percentage { | |
margin-top: 2em; | |
margin-bottom: calc( -2rem - 1em ); | |
font-family: monospace; | |
} | |
' | |
] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment