Skip to content
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

[CLEANUP] Autoformat the code #749

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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