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

Errors when parsing bulma.css #136

Open
mit-mit opened this issue Sep 16, 2021 · 1 comment
Open

Errors when parsing bulma.css #136

mit-mit opened this issue Sep 16, 2021 · 1 comment
Labels
status-blocked Blocked from making progress by another (referenced) issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@mit-mit
Copy link
Member

mit-mit commented Sep 16, 2021

The following repro finds 6 errors in bulma/css/bulma.css from:
https://github.com/jgthms/bulma/releases/tag/0.9.3

import 'dart:io';
import 'package:csslib/parser.dart';

const testOptions = PreprocessorOptions(
  useColors: false,
  checked: false,
  warningsAsErrors: true,
  inputFile: 'memory',
);

void main() {
  final cssFile = File('bulma.css');
  final css = cssFile.readAsStringSync();
  final errors = <Message>[];
  final stylesheet = parse(css, errors: errors, options: testOptions);
  print(
      'parsed ${stylesheet.topLevels.length} nodes with ${errors.length} errors');
}
@devoncarew devoncarew added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jan 27, 2023
@devoncarew
Copy link
Member

devoncarew commented Jan 27, 2023

The first error - which may be causing the others - is on:

.hero.is-white a:not(.button):not(.dropdown-item):not(.tag):not(.pagination-link.is-current),
                                                                                ^
.hero.is-white strong {
  color: inherit;
}

I suspect this is related to #141 and our handling of pseudo selectors (:not()). We're (mostly?) following the selector level 3 grammar - we don't support the newer selector level 4 grammar.

devoncarew added a commit that referenced this issue Jan 27, 2023
devoncarew added a commit that referenced this issue Jan 31, 2023
@devoncarew devoncarew added the status-blocked Blocked from making progress by another (referenced) issue label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status-blocked Blocked from making progress by another (referenced) issue type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants