tree-sitter-css/corpus/statements.txt

160 lines
4.7 KiB
Plaintext
Raw Normal View History

2018-10-18 16:59:09 +00:00
==============================
Import statements
==============================
@import url("fineprint.css") print;
@import url("bluish.css") speech;
@import 'custom.css';
@import url("chrome://communicator/skin/");
@import "common.css" screen;
---
(stylesheet
(import_statement (call_expression (function_name) (arguments (string_value))) (keyword_query))
(import_statement (call_expression (function_name) (arguments (string_value))) (keyword_query))
(import_statement (string_value))
(import_statement (call_expression (function_name) (arguments (string_value))))
(import_statement (string_value) (keyword_query)))
2018-10-26 18:46:10 +00:00
==============================
Namespace statements
==============================
/* Default namespace */
@namespace url(XML-namespace-URL);
@namespace "XML-namespace-URL";
@namespace url(http://www.w3.org/1999/xhtml);
@namespace svg url(http://www.w3.org/2000/svg);
/* Prefixed namespace */
@namespace prefix url(XML-namespace-URL);
@namespace prefix "XML-namespace-URL";
---
(stylesheet
(comment)
(namespace_statement (call_expression (function_name) (arguments (plain_value))))
(namespace_statement (string_value))
(namespace_statement (call_expression (function_name) (arguments (plain_value))))
(namespace_statement (namespace_name) (call_expression (function_name) (arguments (plain_value))))
(comment)
(namespace_statement (namespace_name) (call_expression (function_name) (arguments (plain_value))))
(namespace_statement (namespace_name) (string_value)))
2018-10-26 18:56:10 +00:00
==============================
Keyframes statements
==============================
@keyframes important1 {
from { margin-top: 50px; }
50% { margin-top: 150px !important; } /* ignored */
to { margin-top: 100px; }
}
---
(stylesheet
(keyframes_statement (keyframes_name) (keyframe_block_list
(keyframe_block (from) (block (declaration (property_name) (integer_value (unit)))))
(keyframe_block (integer_value (unit)) (block (declaration (property_name) (integer_value (unit)) (important))))
(comment)
(keyframe_block (to) (block (declaration (property_name) (integer_value (unit))))))))
2018-10-18 16:59:09 +00:00
==============================
Media statements
==============================
@media screen and (min-width: 30em) and (orientation: landscape) {}
@media (min-height: 680px), screen and (orientation: portrait) {}
@media not all and (monochrome) {}
2018-10-29 22:46:58 +00:00
@media only screen {}
2018-10-18 16:59:09 +00:00
---
(stylesheet
(media_statement
(binary_query
(binary_query
(keyword_query)
(feature_query (feature_name) (integer_value (unit))))
(feature_query (feature_name) (plain_value)))
2018-10-18 16:59:09 +00:00
(block))
(media_statement
(feature_query (feature_name) (integer_value (unit)))
(binary_query (keyword_query) (feature_query (feature_name) (plain_value)))
2018-10-18 16:59:09 +00:00
(block))
(media_statement
2018-10-29 22:46:58 +00:00
(binary_query (unary_query (keyword_query)) (parenthesized_query (keyword_query)))
(block))
(media_statement (unary_query (keyword_query)) (block)))
2018-10-18 16:59:09 +00:00
2018-10-26 21:01:52 +00:00
==============================
Supports statements
==============================
@supports (animation-name: test) {
div { animation-name: test; }
}
@supports (transform-style: preserve) or (-moz-transform-style: preserve) {}
@supports not ((text-align-last: justify) or (-moz-text-align-last: justify)) {}
@supports not selector(:matches(a, b)) {}
---
(stylesheet
(supports_statement
(feature_query (feature_name) (plain_value))
(block
(rule_set (selectors (tag_name)) (block
(declaration (property_name) (plain_value))))))
(supports_statement
(binary_query
(feature_query (feature_name) (plain_value))
(feature_query (feature_name) (plain_value)))
(block))
(supports_statement
2018-10-29 22:46:58 +00:00
(unary_query (parenthesized_query (binary_query
2018-10-26 21:01:52 +00:00
(feature_query (feature_name) (plain_value))
(feature_query (feature_name) (plain_value)))))
(block))
(supports_statement
2018-10-29 22:46:58 +00:00
(unary_query (selector_query (pseudo_class_selector
2018-10-26 21:01:52 +00:00
(class_name)
2018-10-29 22:45:05 +00:00
(arguments (tag_name) (tag_name)))))
2018-10-26 21:01:52 +00:00
(block)))
2018-10-18 16:59:09 +00:00
==============================
Charset statements
==============================
@charset "utf-8";
---
(stylesheet
(charset_statement (string_value)))
==============================
Other at-statements
==============================
@font-face {
font-family: "Open Sans";
src: url("/a") format("woff2"), url("/b/c") format("woff");
}
---
(stylesheet
(at_rule
(at_keyword)
(block
(declaration (property_name) (string_value))
(declaration (property_name)
(call_expression (function_name) (arguments (string_value)))
(call_expression (function_name) (arguments (string_value)))
(call_expression (function_name) (arguments (string_value)))
(call_expression (function_name) (arguments (string_value)))))))