-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Localization-prevention does not work under the following conditions:
- Optimization level is set to 'Advanced';
- A keyword is used with a $ prefix in the local-rules of a component.
- The same keyword is used in a global-rule in any component that is included in the css.
Example where is works fine with advanced compilation
(defui B
static css/CSS
(local-rules [this] [:.c {..}])
(include-children [this] [])
static css/Global
(global-rules [this] [[:.d {..}]])
(defui A
static css/CSS
(local-rules [this] [:.a {..}
[
:$b {..}]])
(include-children [this] [B]))
This works because the keyword 'b' is not used in the global rules of the parents, children or siblings
Example where it is broken
(defui B
static css/CSS
(local-rules [this] [:.c {..}])
(include-children [this] [])
static css/Global
(global-rules [this] [[
:.b {..}]])
(defui A
static css/CSS
(local-rules [this] [:.a {..}
[
:$b {..}]])
(include-children [this] [B]))
This doesn't work because the keyword 'b' is used in the global rules of Component-B and in the local rules of Component-A
Note: This only happens when optimisation level is set to :advanced