diff --git a/Base/res/html/misc/custom-properties.html b/Base/res/html/misc/custom-properties.html index 8ff9584355..b4766b2be4 100644 --- a/Base/res/html/misc/custom-properties.html +++ b/Base/res/html/misc/custom-properties.html @@ -6,6 +6,12 @@ @@ -63,6 +130,98 @@ This should be pink + +
+ .test-fallback { + background-color: var(--fallback, lime); + } + + .test-fallback.with { + --fallback: cyan; + } ++ +
.test-fallback+ This should be green +
.test-fallback.with+ This should be cyan +
+ :root { + --width: 10px; + --color: orange; + --style: solid; + --border: var(--width) var(--color) var(--style); + } + .test-nested { + border: var(--border); + } ++ +
.test-nested+ This should have a 10px solid orange border +
+ :root { + --background-color: yellow; + --background-position: top 10px right 5px; + } + + .test-mixed { + background: var(--background-color) url("background-repeat.png") var(--background-position) no-repeat; + } ++ +
.test-mixed+ This should have a yellow background with a smiley face in the top-right corner +
+ .billion-laughs { + --prop1: lol; + --prop2: var(--prop1) var(--prop1); + --prop3: var(--prop2) var(--prop2); + + /* ... */ + + --prop30: var(--prop29) var(--prop29); + + background: var(--prop30); + } ++
.billion-laughs+ This box tests that we handle the billion laughs attack. If we don't crash, it worked! +
+ .dependency-cycle { + --recursive: var(--recursive); + + --a: var(--b); + --b: var(--a); + + background: var(--a); + color: var(--recursive); + } ++
.dependency-cycle+ This box tests that we handle dependency cycles correctly. If we don't crash, it worked! +