Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization-prevention in advanced compilation #10

Open
TimovanderKamp opened this issue Jun 23, 2017 · 0 comments
Open

Localization-prevention in advanced compilation #10

TimovanderKamp opened this issue Jun 23, 2017 · 0 comments

Comments

@TimovanderKamp
Copy link

Localization-prevention does not work under the following conditions:

  1. Optimization level is set to 'Advanced';
  2. A keyword is used with a $ prefix in the local-rules of a component.
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant