This repository has been archived by the owner on Nov 26, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for custom special properties when cascading styles.
- Loading branch information
Showing
2 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
(ns guiftw.special) | ||
|
||
(defn special-spec? [spec] | ||
(defn special-spec? | ||
"Returns :special if spec is of an special property." | ||
[spec] | ||
(if (some #{\*} (name spec)) | ||
:special)) | ||
|
||
(defn special-merge | ||
"Inherit id and groups only from the other one. | ||
Because when reducing styles, the last one will | ||
be always private object's style, only id and | ||
groups stored in there will be in final style." | ||
[specials other-specials] | ||
(merge (dissoc specials :*id :*groups) other-specials)) |
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