59 Commits

Author SHA1 Message Date
Connor Skees
ffaee04613
rewrite parsing, evaluation, and serialization (#67)
Adds support for the indented syntax, plain CSS imports, `@forward`, and many other previously missing features.
2022-12-26 15:33:04 -05:00
Connor Skees
34fed92bdf add attribute selector test from sass issue tracker 2021-07-31 11:47:48 -04:00
Connor Skees
548a5921e6 encountering placeholder selector resets has_written 2021-07-23 03:28:41 -04:00
Connor Skees
d360af2cd6 improve code coverage 2021-07-21 09:17:37 -04:00
Connor Skees
8e08a5de4f support special fns inside min and max 2021-07-12 01:59:30 -04:00
Connor Skees
5c61f8ccaa :is is alias for :matches 2021-07-04 11:48:13 -04:00
Connor Skees
884b92f476 remove test macro shorthand for unchanged output 2020-11-20 04:34:36 -05:00
Connor Skees
8d1e8a99c5 refactor how default variables are evaluated 2020-08-17 06:16:18 -04:00
Connor Skees
44ecd82454 add ignored test for silent comment in attribute 2020-08-17 05:13:30 -04:00
Connor Skees
5bcf499942 & is null inside selectors at root 2020-08-17 03:13:45 -04:00
Connor Skees
a665cb13cc remove cfg(test) from test files 2020-08-11 20:22:24 -04:00
Connor Skees
38a37a3997 more robustly parse !optional in selectors 2020-08-07 13:40:22 -04:00
Connor Skees
a79c62c2fa allow escaped ! in selectors 2020-08-04 02:05:59 -04:00
Connor Skees
25862a5af8 do not strip whitespace before comma in psuedo selector 2020-07-07 11:37:20 -04:00
Connor Skees
c4439c14fd do not strip newlines after comments in selectors 2020-07-04 21:02:49 -04:00
Connor Skees
f476f4af25 no longer strip whitespace at the end of selectors
the whitespace can sometimes be part of an escape, e.g. `\ `
2020-06-30 06:43:26 -04:00
ConnorSkees
402d7bf8e6 unignore passing tests 2020-06-23 04:28:54 -04:00
ConnorSkees
a3a33db47a improve selector error handling 2020-06-22 12:39:09 -04:00
ConnorSkees
d3413b7cbf & is null when at root 2020-06-18 18:22:58 -04:00
ConnorSkees
e86524c960 add test for ::{} (panic under old parser) 2020-06-12 21:51:17 -04:00
ConnorSkees
b4ef2a6fb4 add tests for an+b 2020-05-31 15:16:38 -04:00
ConnorSkees
f3a58e0fa3 initial implementation of selector-* builtin fns 2020-05-31 04:51:41 -04:00
ConnorSkees
812e9fec9c rustfmt 2020-05-24 13:50:45 -04:00
ConnorSkees
096abb6ca0 handle selector with nothing after colon 2020-05-24 09:07:16 -04:00
ConnorSkees
042dbfa914 remove panics from missing identifiers 2020-05-24 08:56:53 -04:00
ConnorSkees
a01ed981ce make parsing of toplevel tokens more robust 2020-05-24 07:43:54 -04:00
ConnorSkees
130177d9fe allow + in selectors 2020-05-23 12:06:04 -04:00
ConnorSkees
6b9f68922f allow non-ascii alphanumeric characters in selectors 2020-05-21 13:09:20 -04:00
ConnorSkees
eb7fe52074 minor cleanup 2020-05-19 18:28:18 -04:00
ConnorSkees
2d0a9abb13 parse selectors that grow larger from interpolation 2020-05-16 17:28:30 -04:00
ConnorSkees
eea8bdbc25 allow escapes at the start of selectors 2020-05-16 16:15:11 -04:00
ConnorSkees
f6fd0e9af5 refactor how & is handled in values 2020-04-26 13:07:44 -04:00
ConnorSkees
4a2503b04c refactor attribute parsing 2020-04-26 00:55:38 -04:00
ConnorSkees
637dc39544 prefer #[ignore] over commenting out tests 2020-04-25 12:16:10 -04:00
ConnorSkees
86f2ac6a6c remove placeholders in pseudo parens closer to correct 2020-04-05 12:52:02 -04:00
ConnorSkees
49d823c990 add sass nesting spec test verbatim 2020-04-05 02:48:17 -04:00
ConnorSkees
b7b58c2ac6 selector unification of pseudo parens 2020-04-05 02:39:38 -04:00
ConnorSkees
2a01668ae0 refactor selector parsing 2020-04-03 13:28:37 -04:00
ConnorSkees
4565121b34 for now, don't unquote attr val 2020-04-02 22:07:22 -04:00
ConnorSkees
db9515d347 strip qutoes from attribute value 2020-04-02 21:59:36 -04:00
ConnorSkees
c1d79047f2 change casing of expected in modifier error 2020-04-02 21:51:55 -04:00
ConnorSkees
476578cdc6 fail on modifier with attrkind any 2020-04-02 21:44:26 -04:00
ConnorSkees
b71b11dccb selector can start with > 2020-04-01 22:31:10 -04:00
ConnorSkees
6df6bcf1da refactor value parsing 2020-04-01 15:32:52 -04:00
ConnorSkees
86729df241 handle \ in selectors 2020-03-30 03:13:29 -04:00
ConnorSkees
7164728c69 properly handle hash in string 2020-03-30 02:54:11 -04:00
ConnorSkees
31ec0cc7f8 properly handle interpolation in selectors 2020-03-30 02:30:44 -04:00
ConnorSkees
8f96a821f7 allow id selectors to start with numbers 2020-03-30 00:18:37 -04:00
ConnorSkees
d7b22a41a6 Properly handle & in most contexts 2020-03-01 12:03:14 -05:00
ConnorSkees
ed4d19fe96 Initial implementation of placeholder selectors 2020-02-29 17:23:17 -05:00