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

When imported vars have names that start the same, they can "collide" #363

Closed
getkey opened this issue Nov 10, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@getkey
Copy link
Contributor

commented Nov 10, 2017

The best way to describe this is an example so here you go!

Files

/* /1.css */
@value steelgrey: #7e91ab;
@value steelgrey-light: #bac9de;
/* /2.css */
@value * as v from '1.css';

.stuff {
  color: v.steelgrey-light;
}

CSS Output

/* 2.css */
.mc749ba2db_stuff {
  color: #7e91ab-light;
}

@getkey getkey changed the title When imported vars have name that start the same they can "collide" When imported vars have names that start the same, they can "collide" Nov 10, 2017

tivac added a commit that referenced this issue Nov 10, 2017

WIP: sort values to match by length
So that values with the same prefixes don't stomp over each other. This feels a bit hacky but works for now.

Fixes #363

@tivac tivac closed this in #365 Nov 13, 2017

tivac added a commit that referenced this issue Nov 13, 2017

fix: Overlapping value replacement (#365)
* WIP: sort values to match by length

So that values with the same prefixes don't stomp over each other. This feels a bit hacky but works for now.

Fixes #363

* test: Fix up travis failures

- Directly write files instead of copying
- Use travis in VM mode instead of container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.