tests(css): custom media (#3879)

master
Evilebot Tnawi 2018-02-03 18:04:59 +03:00 committed by GitHub
parent d8ecf26ef6
commit 0e8f3acb59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 283 additions and 0 deletions

View File

@ -596,6 +596,135 @@ suffix
`;
exports[`custom-media.css 1`] = `
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width:30em);
@custom-media --small-viewport ( max-width : 30em ) ;
@custom-media --small-viewport
(max-width: 30em);
@custom-media
--small-viewport
(
max-width: 30em
);
@custom-media
--small-viewport
(
max-width
:
30em
)
;
@custom-media
--small-viewport
(
max-width
:
30em
)
;
@custom-media --none not all;
@custom-media --none not all ;
@custom-media --none
not all;
@custom-media --none
not
all;
@custom-media
--none
not
all
;
@custom-media
--none
not
all
;
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width:768px) and (max-width:1279px);
@custom-media --tablet ( min-width : 768px ) and ( max-width : 1279px ) ;
@custom-media --tablet
(min-width: 768px) and (max-width: 1279px);
@custom-media
--tablet
(min-width: 768px) and
(max-width: 1279px);
@custom-media
--tablet
(
min-width
:
768px
)
and
(
max-width
:
1279px
)
;
@custom-media
--tablet
(
min-width
:
768px
)
and
(
max-width
:
1279px
)
;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width: 30em);
@custom-media --none not all;
@custom-media --none not all;
@custom-media --none not all;
@custom-media --none not all;
@custom-media --none not all;
@custom-media --none not all;
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
`;
exports[`custom-selector.css 1`] = `
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
@custom-selector :--heading h1,h2,h3,h4,h5,h6;

View File

@ -0,0 +1,104 @@
@custom-media --small-viewport (max-width: 30em);
@custom-media --small-viewport (max-width:30em);
@custom-media --small-viewport ( max-width : 30em ) ;
@custom-media --small-viewport
(max-width: 30em);
@custom-media
--small-viewport
(
max-width: 30em
);
@custom-media
--small-viewport
(
max-width
:
30em
)
;
@custom-media
--small-viewport
(
max-width
:
30em
)
;
@custom-media --none not all;
@custom-media --none not all ;
@custom-media --none
not all;
@custom-media --none
not
all;
@custom-media
--none
not
all
;
@custom-media
--none
not
all
;
@custom-media --tablet (min-width: 768px) and (max-width: 1279px);
@custom-media --tablet (min-width:768px) and (max-width:1279px);
@custom-media --tablet ( min-width : 768px ) and ( max-width : 1279px ) ;
@custom-media --tablet
(min-width: 768px) and (max-width: 1279px);
@custom-media
--tablet
(min-width: 768px) and
(max-width: 1279px);
@custom-media
--tablet
(
min-width
:
768px
)
and
(
max-width
:
1279px
)
;
@custom-media
--tablet
(
min-width
:
768px
)
and
(
max-width
:
1279px
)
;

View File

@ -1,5 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`case.css 1`] = `
@custom-media --KeepName (MIN-WIDTH: 500PX);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@custom-media --KeepName (min-width: 500px);
`;
exports[`case.less 1`] = `
// Convention in this test file:
// - The case should be preserved for things prefixed with "Keep".

1
tests/css_case/case.css Normal file
View File

@ -0,0 +1 @@
@custom-media --KeepName (MIN-WIDTH: 500PX);

View File

@ -29,6 +29,24 @@ exports[`media.css 1`] = `
@media not screen and (color ), print and (color) { }
@media not screen and ( color ), print and (color) { }
@media not screen and ( color ), print and (color) { }
@media (--small-viewport) {}
@media
(
--small-viewport
)
{
}
@media
(
--small-viewport
)
{
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@media screen and (min-width: 480px) {
}
@ -76,6 +94,12 @@ exports[`media.css 1`] = `
}
@media not screen and (color), print and (color) {
}
@media (--small-viewport) {
}
@media (--small-viewport) {
}
@media (--small-viewport) {
}
`;

View File

@ -26,3 +26,21 @@
@media not screen and (color ), print and (color) { }
@media not screen and ( color ), print and (color) { }
@media not screen and ( color ), print and (color) { }
@media (--small-viewport) {}
@media
(
--small-viewport
)
{
}
@media
(
--small-viewport
)
{
}