matthewp / position--sticky-

Polyfill for position: sticky;
175 stars 34 forks source link

Handle SASS debug info #3

Closed turadg closed 11 years ago

turadg commented 11 years ago

CSS compiled by SASS has a debug info declaration which has nested braces. This commit makes the regex consume the second closing brace so it doesn't get parsed as part of the following selector.

E.g.

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/turadg\/Code\/Ruby\/app-rails\/app\/assets\/stylesheets\/objectives\/objectives\.css\.scss}line{font-family:\000032}}body.objectives.show #sidebar {  top: 15px;  position: sticky; }

was causing DOM error 12 because parse(css) was passing }body.objectives.show #sidebar to qSA (querySelectorAll).

matthewp commented 11 years ago

Thanks!