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

Structural optimization fails on browser hacks #231

Closed
asapach opened this issue Jun 20, 2015 · 8 comments
Closed

Structural optimization fails on browser hacks #231

asapach opened this issue Jun 20, 2015 · 8 comments
Labels

Comments

@asapach
Copy link

asapach commented Jun 20, 2015

Reproducible on Bootstrap 3.3.5:

.caret {
  border-top: 4px dashed;
  border-top: 4px solid \9;
}

Optimized:

.caret {
  border-top: 4px solid \9;
}

The IE8 browser hack breaks the other declaration.

@bc-jasond
Copy link

@asapach you beat me to it... I'm seeing this too

@jmcmichael
Copy link

Same here. Finally tracked the missing Bootstrap caret to CSSO. (Fabulous package otherwise!) Toggling structural optimization to false unsurprisingly solves the problem (and surprisingly results in a smaller CSS file).

@mourukoski
Copy link

I also came across this problem. As jmcmichael said, setting structural optimization to false fortunately fixes this problem.

@lahmatiy lahmatiy added the bug label Oct 7, 2015
@lahmatiy
Copy link
Member

lahmatiy commented Oct 7, 2015

Fixed by #166

@tkrotoff
Copy link

tkrotoff commented Oct 7, 2015

+1

@lahmatiy lahmatiy closed this as completed Oct 7, 2015
@tkrotoff
Copy link

tkrotoff commented Oct 8, 2015

@lahmatiy Sure this is fixed? I'm a strong believer in "What ain't tested, ain't working" :) and PR #166 does not include any unit test

$ ./bin/csso --version
1.3.12
$ echo ".caret { border-top: 4px dashed; border-top: 4px solid \9; }" > test.css
$ ./bin/csso test.css
.caret{border-top:4px solid \9}

The PR integration is probably the cause: look at https://github.com/css/csso/blob/v1.3.12/lib/compressor.js#L125 vs https://github.com/css/csso/pull/166/files#diff-e83fb3368ebbc864f774279d085ac1a8R124
Commit: 42da5bc#diff-e83fb3368ebbc864f774279d085ac1a8L126

@lahmatiy lahmatiy reopened this Oct 8, 2015
@lahmatiy
Copy link
Member

lahmatiy commented Oct 8, 2015

Thank you for your feedback.
Will investigate issue and add tests this time.

@lahmatiy
Copy link
Member

lahmatiy commented Oct 8, 2015

I see it's another issue now. It's connected with wrong structural optimisation.
Collecting issue #241

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

No branches or pull requests

6 participants