Natalie Weizenbaum
44244a2e88
Don't register a selector unnecessarily.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
4193b6346b
Simplify specificity propagation.
...
A simple selector's source specificity should only come from its
original complex selector, and shouldn't be modified by extensions.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
9cfbf79f47
Check extend usage after the fact.
...
This means that extensions that match but fail to unify are valid, but
we think that's okay; see sass/sass#2250 .
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
9ded7e9e68
Use Maps rather than Expandos in Extender.
...
This seems to be substantially faster, at least on the VM.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
2f1fbcde69
Extend compound selectors in parallel.
...
Rather than extending each selector individually and unifying them with
the un-extended rest, this extends everything in one step and unifies in
the next.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
5a9b11084b
Track the extender in the ExtendState.
...
Also rename it Extension.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
fe286487bd
Track extenders by complex selector.
...
This allows us to share more logic if selector lists overlap.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
4173ffc901
Factor out _maybeExtendPseudo from _extendCompound.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
454171d7a0
Clean up _extendComplex by removing a variable.
2017-05-27 17:47:34 -07:00
Natalie Weizenbaum
4243535941
Update the formatter version.
2017-05-27 17:18:13 -07:00
Natalie Weizenbaum
b8c52743f6
Fix analysis errors.
2017-05-18 17:11:32 -07:00
Natalie Weizenbaum
7248cf0e27
Use real generic method syntax.
2017-05-18 17:11:32 -07:00
Natalie Weizenbaum
2f53f85053
Fix another extend edge-case.
2017-02-16 18:41:11 -08:00
Natalie Weizenbaum
7fe9dd8735
Fix hacky combinator unification.
2017-02-16 18:31:06 -08:00
Natalie Weizenbaum
b32e5f96ce
Fix a multi-combinator extend edge case.
2017-02-03 16:49:55 -08:00
Natalie Weizenbaum
73be343be5
Fix a selector pseudo superselector edge case.
2017-02-03 16:15:15 -08:00
Natalie Weizenbaum
35d1af51d1
Update namespace extend per sass/sass#2229. ( #106 )
2017-01-26 20:12:22 -08:00
Natalie Weizenbaum
91b7178e2a
Fix ID equality. ( #99 )
2017-01-13 16:26:03 -08:00
Natalie Weizenbaum
016fe59d1f
Forbid extending across media queries.
2017-01-13 01:53:04 -08:00
Natalie Weizenbaum
354b7e694e
Remove an unnecessary toList() call.
2017-01-13 00:22:06 -08:00
Natalie Weizenbaum
8c4f0bdf81
Fix superselector computation for :not().
2017-01-06 21:31:09 -08:00
Natalie Weizenbaum
beb1a0bd09
Properly handle extended pseudos.
...
There was a logic bug when we created a new selector that injected
extended pseudo-selectors into a previous selector. We would overwrite
the last selector after the original pseudo rather than overwriting the
pseudo itself.
2016-12-29 12:33:12 -08:00
Natalie Weizenbaum
f17edb83d8
Fix an allocation-avoidance case.
...
When extending a selector pseudo, if the selector was unchanged, we
weren't short-circuiting as we should have. This fixes that so now we
avoid allocations unless the selector actually changes.
Closes #81
2016-12-29 12:33:12 -08:00
Natalie Weizenbaum
69762ff0b0
Ignore duplicate extensions.
...
Closes #76
2016-12-20 17:41:21 -08:00
Natalie Weizenbaum
3b6f01be84
Make ExtendSource.extender a plain SelectorList.
...
The span attached to the CssValue wasn't being used.
2016-12-20 17:40:23 -08:00
Natalie Weizenbaum
d5a8a3f725
Fix a few extend issues. ( #75 )
2016-12-19 15:23:14 -08:00
Natalie Weizenbaum
717da0d5bb
Improve the error message for a failed @extend. ( #65 )
2016-12-09 17:29:58 -08:00
Natalie Weizenbaum
f912bb97ac
Fix another @extend bug.
...
We weren't computing parent superselectors correctly.
2016-11-15 00:57:04 -08:00
Natalie Weizenbaum
d1fa5341c9
Fix a bug with superselector calculations.
2016-11-15 00:02:31 -08:00
Natalie Weizenbaum
b9b8e3676f
Fix an extend bug with combinators. ( #43 )
2016-11-13 17:38:14 -08:00
Natalie Weizenbaum
2db0c08b29
Fix more specificity bugs.
2016-10-30 14:45:45 -07:00
Natalie Weizenbaum
468f21f4eb
Track selector sources as specificity.
2016-10-30 14:19:27 -07:00
Natalie Weizenbaum
5ccec2b5be
Fix another bug in _groupSelectors.
2016-10-30 13:59:43 -07:00
Natalie Weizenbaum
43917fe25a
Fix a bug in _groupSelectors.
2016-10-28 14:00:00 -07:00
Natalie Weizenbaum
80055653d9
Match Ruby Sass's source-tracking behavior.
2016-10-22 16:37:51 -07:00
Natalie Weizenbaum
95508b2713
Fix some edge-case-y extend logic.
2016-10-19 21:05:52 -07:00
Natalie Weizenbaum
a515aa1873
Fix an @extend bug.
2016-10-19 18:40:50 -07:00
Natalie Weizenbaum
13156d5107
Disable implicit downcasts.
2016-10-19 17:56:48 -07:00
Natalie Weizenbaum
9751f8e459
Fix a couple extend crashes.
2016-10-18 22:16:12 -07:00
Natalie Weizenbaum
90d9ed03cc
Fix a couple infinite-loop bugs.
2016-10-16 12:09:42 -07:00
Natalie Weizenbaum
4c418603e0
API docs for days.
2016-10-09 23:51:20 -07:00
Natalie Weizenbaum
3e10e24341
Even more API docs.
2016-10-09 20:57:28 -07:00
Natalie Weizenbaum
3a0c5ce09c
More API docs.
2016-10-09 16:36:36 -07:00
Natalie Weizenbaum
9f21fa943e
Make transitive @extend work.
...
Loops are still kind of iffy.
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
9d2d8652dc
@extend into pseudo-selectors
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
390d0ac482
Remove another outdated TODO.
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
265a4c8946
Preserve newlines through @extend.
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
754b1895ac
Add selector-unify().
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
a993a7667e
Add selector-replace().
2016-09-30 12:41:41 -07:00
Natalie Weizenbaum
63ec19f469
Fix a formatting nit.
2016-09-30 12:41:41 -07:00