Created
January 6, 2018 07:10
-
-
Save Fustrate/c0134c4074d11c7146e7c3ee65cba8ce to your computer and use it in GitHub Desktop.
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
# Input: "@supports (display: flex) { @media screen and (min-width: 900px) { article { padding: 1rem 3rem; } } }" | |
[ | |
{ | |
:node=>:at_rule, | |
:name=>"supports", | |
:prelude=>[ | |
{:node=>:whitespace, :pos=>9, :raw=>" "}, | |
{ | |
:node=>:simple_block, | |
:start=>"(", | |
:end=>")", | |
:value=>[ | |
{:node=>:ident, :pos=>11, :raw=>"display", :value=>"display"}, | |
{:node=>:colon, :pos=>18, :raw=>":"}, | |
{:node=>:whitespace, :pos=>19, :raw=>" "}, | |
{:node=>:ident, :pos=>20, :raw=>"flex", :value=>"flex"} | |
], | |
:tokens=>[ | |
{:node=>:"(", :pos=>10, :raw=>"("}, | |
{:node=>:ident, :pos=>11, :raw=>"display", :value=>"display"}, | |
{:node=>:colon, :pos=>18, :raw=>":"}, | |
{:node=>:whitespace, :pos=>19, :raw=>" "}, | |
{:node=>:ident, :pos=>20, :raw=>"flex", :value=>"flex"}, | |
{:node=>:")", :pos=>24, :raw=>")"} | |
] | |
}, | |
{:node=>:whitespace, :pos=>25, :raw=>" "} | |
], | |
:block=>[ | |
{:node=>:whitespace, :pos=>27, :raw=>" "}, | |
{:node=>:at_keyword, :pos=>28, :raw=>"@media", :value=>"media"}, | |
{:node=>:whitespace, :pos=>34, :raw=>" "}, | |
{:node=>:ident, :pos=>35, :raw=>"screen", :value=>"screen"}, | |
{:node=>:whitespace, :pos=>41, :raw=>" "}, | |
{:node=>:ident, :pos=>42, :raw=>"and", :value=>"and"}, | |
{:node=>:whitespace, :pos=>45, :raw=>" "}, | |
{ | |
:node=>:simple_block, | |
:start=>"(", | |
:end=>")", | |
:value=>[ | |
{:node=>:ident, :pos=>47, :raw=>"min-width", :value=>"min-width"}, | |
{:node=>:colon, :pos=>56, :raw=>":"}, | |
{:node=>:whitespace, :pos=>57, :raw=>" "}, | |
{:node=>:dimension, :pos=>58, :raw=>"900px", :repr=>"900", :type=>:integer, :unit=>"px", :value=>900} | |
], | |
:tokens=>[ | |
{:node=>:"(", :pos=>46, :raw=>"("}, | |
{:node=>:ident, :pos=>47, :raw=>"min-width", :value=>"min-width"}, | |
{:node=>:colon, :pos=>56, :raw=>":"}, | |
{:node=>:whitespace, :pos=>57, :raw=>" "}, | |
{:node=>:dimension, :pos=>58, :raw=>"900px", :repr=>"900", :type=>:integer, :unit=>"px", :value=>900}, | |
{:node=>:")", :pos=>63, :raw=>")"} | |
] | |
}, | |
{:node=>:whitespace, :pos=>64, :raw=>" "}, | |
{ | |
:node=>:simple_block, | |
:start=>"{", | |
:end=>"}", | |
:value=>[ | |
{:node=>:whitespace, :pos=>66, :raw=>" "}, | |
{:node=>:ident, :pos=>67, :raw=>"article", :value=>"article"}, | |
{:node=>:whitespace, :pos=>74, :raw=>" "}, | |
{ | |
:node=>:simple_block, | |
:start=>"{", | |
:end=>"}", | |
:value=>[ | |
{:node=>:whitespace, :pos=>76, :raw=>" "}, | |
{:node=>:ident, :pos=>77, :raw=>"padding", :value=>"padding"}, | |
{:node=>:colon, :pos=>84, :raw=>":"}, | |
{:node=>:whitespace, :pos=>85, :raw=>" "}, | |
{:node=>:dimension, :pos=>86, :raw=>"1rem", :repr=>"1", :type=>:integer, :unit=>"rem", :value=>1}, | |
{:node=>:whitespace, :pos=>90, :raw=>" "}, | |
{:node=>:dimension, :pos=>91, :raw=>"3rem", :repr=>"3", :type=>:integer, :unit=>"rem", :value=>3}, | |
{:node=>:semicolon, :pos=>95, :raw=>";"}, | |
{:node=>:whitespace, :pos=>96, :raw=>" "} | |
], | |
:tokens=>[ | |
{:node=>:"{", :pos=>75, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>76, :raw=>" "}, | |
{:node=>:ident, :pos=>77, :raw=>"padding", :value=>"padding"}, | |
{:node=>:colon, :pos=>84, :raw=>":"}, | |
{:node=>:whitespace, :pos=>85, :raw=>" "}, | |
{:node=>:dimension, :pos=>86, :raw=>"1rem", :repr=>"1", :type=>:integer, :unit=>"rem", :value=>1}, | |
{:node=>:whitespace, :pos=>90, :raw=>" "}, | |
{:node=>:dimension, :pos=>91, :raw=>"3rem", :repr=>"3", :type=>:integer, :unit=>"rem", :value=>3}, | |
{:node=>:semicolon, :pos=>95, :raw=>";"}, | |
{:node=>:whitespace, :pos=>96, :raw=>" "}, | |
{:node=>:"}", :pos=>97, :raw=>"}"} | |
] | |
}, | |
{:node=>:whitespace, :pos=>98, :raw=>" "} | |
], | |
:tokens=>[ | |
{:node=>:"{", :pos=>65, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>66, :raw=>" "}, | |
{:node=>:ident, :pos=>67, :raw=>"article", :value=>"article"}, | |
{:node=>:whitespace, :pos=>74, :raw=>" "}, | |
{:node=>:"{", :pos=>75, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>76, :raw=>" "}, | |
{:node=>:ident, :pos=>77, :raw=>"padding", :value=>"padding"}, | |
{:node=>:colon, :pos=>84, :raw=>":"}, | |
{:node=>:whitespace, :pos=>85, :raw=>" "}, | |
{:node=>:dimension, :pos=>86, :raw=>"1rem", :repr=>"1", :type=>:integer, :unit=>"rem", :value=>1}, | |
{:node=>:whitespace, :pos=>90, :raw=>" "}, | |
{:node=>:dimension, :pos=>91, :raw=>"3rem", :repr=>"3", :type=>:integer, :unit=>"rem", :value=>3}, | |
{:node=>:semicolon, :pos=>95, :raw=>";"}, | |
{:node=>:whitespace, :pos=>96, :raw=>" "}, | |
{:node=>:"}", :pos=>97, :raw=>"}"}, | |
{:node=>:whitespace, :pos=>98, :raw=>" "}, | |
{:node=>:"}", :pos=>99, :raw=>"}"} | |
] | |
}, | |
{:node=>:whitespace, :pos=>100, :raw=>" "} | |
], | |
:tokens=>[ | |
{:node=>:at_keyword, :pos=>0, :raw=>"@supports", :value=>"supports"}, | |
{:node=>:whitespace, :pos=>9, :raw=>" "}, | |
{:node=>:"(", :pos=>10, :raw=>"("}, | |
{:node=>:ident, :pos=>11, :raw=>"display", :value=>"display"}, | |
{:node=>:colon, :pos=>18, :raw=>":"}, | |
{:node=>:whitespace, :pos=>19, :raw=>" "}, | |
{:node=>:ident, :pos=>20, :raw=>"flex", :value=>"flex"}, | |
{:node=>:")", :pos=>24, :raw=>")"}, | |
{:node=>:whitespace, :pos=>25, :raw=>" "}, | |
{:node=>:"{", :pos=>26, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>27, :raw=>" "}, | |
{:node=>:at_keyword, :pos=>28, :raw=>"@media", :value=>"media"}, | |
{:node=>:whitespace, :pos=>34, :raw=>" "}, | |
{:node=>:ident, :pos=>35, :raw=>"screen", :value=>"screen"}, | |
{:node=>:whitespace, :pos=>41, :raw=>" "}, | |
{:node=>:ident, :pos=>42, :raw=>"and", :value=>"and"}, | |
{:node=>:whitespace, :pos=>45, :raw=>" "}, | |
{:node=>:"(", :pos=>46, :raw=>"("}, | |
{:node=>:ident, :pos=>47, :raw=>"min-width", :value=>"min-width"}, | |
{:node=>:colon, :pos=>56, :raw=>":"}, | |
{:node=>:whitespace, :pos=>57, :raw=>" "}, | |
{:node=>:dimension, :pos=>58, :raw=>"900px", :repr=>"900", :type=>:integer, :unit=>"px", :value=>900}, | |
{:node=>:")", :pos=>63, :raw=>")"}, | |
{:node=>:whitespace, :pos=>64, :raw=>" "}, | |
{:node=>:"{", :pos=>65, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>66, :raw=>" "}, | |
{:node=>:ident, :pos=>67, :raw=>"article", :value=>"article"}, | |
{:node=>:whitespace, :pos=>74, :raw=>" "}, | |
{:node=>:"{", :pos=>75, :raw=>"{"}, | |
{:node=>:whitespace, :pos=>76, :raw=>" "}, | |
{:node=>:ident, :pos=>77, :raw=>"padding", :value=>"padding"}, | |
{:node=>:colon, :pos=>84, :raw=>":"}, | |
{:node=>:whitespace, :pos=>85, :raw=>" "}, | |
{:node=>:dimension, :pos=>86, :raw=>"1rem", :repr=>"1", :type=>:integer, :unit=>"rem", :value=>1}, | |
{:node=>:whitespace, :pos=>90, :raw=>" "}, | |
{:node=>:dimension, :pos=>91, :raw=>"3rem", :repr=>"3", :type=>:integer, :unit=>"rem", :value=>3}, | |
{:node=>:semicolon, :pos=>95, :raw=>";"}, | |
{:node=>:whitespace, :pos=>96, :raw=>" "}, | |
{:node=>:"}", :pos=>97, :raw=>"}"}, | |
{:node=>:whitespace, :pos=>98, :raw=>" "}, | |
{:node=>:"}", :pos=>99, :raw=>"}"}, | |
{:node=>:whitespace, :pos=>100, :raw=>" "}, | |
{:node=>:"}", :pos=>101, :raw=>"}"} | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment