Skip to content

Added tests for rest of valid @property syntaxes #278

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

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
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
76 changes: 74 additions & 2 deletions tests/css-properties-values-api-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,92 @@ export default {
dev: '#the-syntax-descriptor',
},
required: {
"'x | y'": {
"'*'": {
descriptor: "inherits: false; initial-value: foo",
},
"'x'": {
descriptor: "inherits: false; initial-value: x",
},
"'<length>'": {
descriptor: "inherits: false; initial-value: 100px",
},
"'<number>'": {
descriptor: "inherits: false; initial-value: 1.23",
},
"'<percentage>'": {
descriptor: "inherits: false; initial-value: 50%",
},
"'<length-percentage>'": {
descriptor: "inherits: false; initial-value: calc(50% + 10px)",
},
"'<string>'": {
descriptor: "inherits: false; initial-value: 'foo'",
},
"'<color>'": {
descriptor: "inherits: false; initial-value: red",
},
"'<image>'": {
descriptor: "inherits: false; initial-value: linear-gradient(red, blue)",
},
"'<url>'": {
descriptor: "inherits: false; initial-value: url('foo.png')",
},
"'<integer>'": {
descriptor: "inherits: false; initial-value: 1",
},
"'<angle>'": {
descriptor: "inherits: false; initial-value: 90deg",
},
"'<time>'": {
descriptor: "inherits: false; initial-value: 1s",
},
"'<resolution>'": {
descriptor: "inherits: false; initial-value: 300dpi",
},
"'<transform-function>'": {
descriptor: "inherits: false; initial-value: rotate(90deg)",
},
"'<custom-ident>'": {
descriptor: "inherits: false; initial-value: foo",
},
"'<transform-list>'": {
descriptor: "inherits: false; initial-value: rotate(90deg) translate(10px, 20px)",
},
"'<length>+'": {
descriptor: "inherits: false; initial-value: 100px 50px",
},
"'<length>#'": {
descriptor: "inherits: false; initial-value: 100px, 50px",
},
"'x | y'": {
descriptor: "inherits: false; initial-value: y",
},
"'<length> | <color>+ | foo'": {
descriptor: "inherits: false; initial-value: red #00f",
},
},
tests: [
"'x | y'",
"'*'",
"'x'",
"'<length>'",
"'<number>'",
"'<percentage>'",
"'<length-percentage>'",
"'<string>'",
"'<color>'",
"'<image>'",
"'<url>'",
"'<integer>'",
"'<angle>'",
"'<time>'",
"'<resolution>'",
"'<transform-function>'",
"'<custom-ident>'",
"'<transform-list>'",
"'<length>+'",
"'<length>#'",
"'x | y'",
"'<length> | <color>+ | foo'",
],
},
'@property --foo/inherits': {
Expand Down