Skip to content

Commit

Permalink
[CLEANUP] Autoformat the code
Browse files Browse the repository at this point in the history
This is the v8.x backport of #748.
  • Loading branch information
oliverklee committed Oct 27, 2024
1 parent 1dd952b commit 1d5e320
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 20 deletions.
19 changes: 15 additions & 4 deletions src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,21 @@ class Size extends PrimitiveValue
* @internal
*/
const ABSOLUTE_SIZE_UNITS = [
'px', 'pt', 'pc',
'cm', 'mm', 'mozmm', 'in',
'vh', 'dvh', 'svh', 'lvh',
'vw', 'vmin', 'vmax', 'rem',
'px',
'pt',
'pc',
'cm',
'mm',
'mozmm',
'in',
'vh',
'dvh',
'svh',
'lvh',
'vw',
'vmin',
'vmax',
'rem',
];

/**
Expand Down
22 changes: 12 additions & 10 deletions tests/CSSList/AtRuleBlockListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ public static function provideSyntacticlyCorrectAtRule()
return [
'media print' => ['@media print { html { background: white; color: black; } }'],
'keyframes' => ['@keyframes mymove { from { top: 0px; } }'],
'supports' => ['
@supports (display: flex) {
.flex-container > * {
text-shadow: 0 0 2px blue;
float: none;
'supports' => [
'
@supports (display: flex) {
.flex-container > * {
text-shadow: 0 0 2px blue;
float: none;
}
.flex-container {
display: flex;
}
}
.flex-container {
display: flex;
}
}
'],
',
],
];
}

Expand Down
34 changes: 28 additions & 6 deletions tests/Value/SizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,34 @@ final class SizeTest extends TestCase
public static function provideUnit()
{
$units = [
'px', 'pt', 'pc',
'cm', 'mm', 'mozmm', 'in',
'vh', 'dvh', 'svh', 'lvh',
'vw', 'vmin', 'vmax', 'rem',
'%', 'em', 'ex', 'ch', 'fr',
'deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz',
'px',
'pt',
'pc',
'cm',
'mm',
'mozmm',
'in',
'vh',
'dvh',
'svh',
'lvh',
'vw',
'vmin',
'vmax',
'rem',
'%',
'em',
'ex',
'ch',
'fr',
'deg',
'grad',
'rad',
's',
'ms',
'turn',
'Hz',
'kHz',
];

return \array_combine(
Expand Down

0 comments on commit 1d5e320

Please sign in to comment.