Last active
November 28, 2024 00:48
-
-
Save rhysburnie/eb076f23e8be611265e2af01188ed7fd to your computer and use it in GitHub Desktop.
floorplan svg selector hooks
This file contains hidden or 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
| @custom-selector :--floorplan-level g[data-name*="level"]; | |
| @custom-selector :--floorplan-tile g[data-name*="level"] > g; | |
| @custom-selector :--floorplan-bg g[data-name*="level"] > g > g[data-name="bg"]; | |
| @custom-selector :--floorplan-lines g[data-name*="level"] > g > g[data-name="lines"]; | |
| @custom-selector :--floorplan-labels g[data-name*="level"] > g > g[data-name="labels"]; | |
| @custom-selector :--floorplan-labels-text g[data-name*="level"] > g > g[data-name="labels"] text; | |
| @custom-selector :--floorplan-base-bg g[data-name*="level"] > g[data-name*="base"] > g[data-name="bg"]; | |
| :root { | |
| --purpleColor: #2B037A; | |
| --redColor: #DD0303; | |
| --mainColor: #fff; | |
| --bgFill: var(--purpleColor); | |
| --bgFusionFill: var(--redColor); | |
| --bgLabelFill: var(--purple-color); | |
| } | |
| .floorplan { | |
| visibility: hidden; | |
| color: var(--mainColor); | |
| } | |
| .floorplan :--floorplan-level, | |
| .floorplan :--floorplan-tile, | |
| .floorplan :--floorplan-labels { | |
| visibility: hidden; | |
| } | |
| .floorplan.visible, | |
| .floorplan :--floorplan-level.visible, | |
| .floorplan :--floorplan-tile.visible, | |
| .floorplan :--floorplan-labels.visible { | |
| visibility: hidden; | |
| } | |
| .floorplan :--floorplan-bg { | |
| fill: var(--bgFill); | |
| } | |
| .floorplan :--floorplan-base-bg { | |
| fill: none; /* is that valid value? */ | |
| } | |
| .floorplan :--floorplan-labels { | |
| fill: var(--bgLabelFill); | |
| } | |
| .floorplan :--floorplan-labels-text { | |
| fill: var(--mainColor); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment