Skip to content

Commit e4d2332

Browse files
authored
Prevent property duplication within a ruleset. (#7)
1 parent e48ed7d commit e4d2332

File tree

5 files changed

+42
-35
lines changed

5 files changed

+42
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Notable changes are documented in this file. The format is based on [Keep a Chan
77
Breaking changes:
88

99
New features:
10+
- A single property appearing more than once within a ruleset now results in a
11+
compiler error.
1012

1113
Bugfixes:
1214

examples/TypeSafety.purs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ import Tecton.Rule as Rule
1313
main :: Effect Unit
1414
main = log $ renderSheet pretty do
1515

16+
{-
17+
-- Error: Property appears twice within a single ruleset.
18+
universal ? Rule.do
19+
color := white
20+
color := black
21+
-}
22+
23+
-- Works
24+
universal ? color := white
25+
1626
-- Animations
1727

1828
let fade = keyframesName "fade"

examples/output/TypeSafety.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* {
2+
color: hsl(0.0, 0.0%, 100.0%);
3+
}
14
@keyframes fade {
25
0% {
36
opacity: 0;

0 commit comments

Comments
 (0)