0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
Commit Graph

124 Commits

Author SHA1 Message Date
Yuji Sugiura
a068719208
[fix] do not be over-eager in removing unused CSS for dialog[open] (#7495) 2022-04-30 13:57:49 -04:00
Yuichiro Yamashita
e0d93254fd
[feature] Dynamic elements implementation <svelte:element> (#6898)
Closes #2324

Co-authored-by: Alfred Ringstad <alfred.ringstad@hyperlab.se>
Co-authored-by: Simon Holthausen <simon.holthausen@accso.de>
Co-authored-by: tanhauhau <lhtan93@gmail.com>
2022-04-08 16:54:55 +02:00
Geoff Rich
0a3353b671
[fix] do not collapse whitespace-only css vars (#7303)
Fixes #7152, see also #7288

--foo:; used to be an invalid CSS custom property value, while -foo: ; was valid. By collapsing the whitespace in these declaration values, we were breaking scenarios where an empty custom property was desired. The spec was updated to trim whitespace and treat these values identically, but Chromium browsers still treat --foo; as invalid. This was recently fixed and will be released in Chrome 99, but this would still be a good fix to maintain backwards compatibility.
2022-03-03 08:25:52 +01:00
Tan Li Hau
ee769101fc
[fix] applying :global for > combinator (#6563) 2021-07-26 13:42:10 -04:00
Tan Li Hau
b23d267f1f
[fix] improper :global() style encapsulation (#6560) 2021-07-22 12:53:45 -04:00
Tan Li Hau
c54d57b0d9
don't scope :root selector (#6514) 2021-07-21 16:33:49 -04:00
Tan Li Hau
3d1af7fb68
support :global() in compound selector (#6223) 2021-04-30 10:35:40 -04:00
Rich Harris
2925a00eff
add cssHash option (#6026)
* Allow to customize the css scope class

* Pass component name to scope class generator

* Move Stylesheet arguments into an object

* Refactor to cssHash

* Please the almighty linter

* pass hash function to cssHash

* update test

* document cssHash option

Co-authored-by: Christian Kaisermann <christian@kaisermann.me>
2021-02-25 18:06:38 -05:00
Tan Li Hau
e8094df779
fix remove of lone :host selectors (#5984) 2021-02-10 22:01:50 -05:00
Tan Li Hau
44f41c9edd
fix :host and :global css scoping (#5957) 2021-02-08 11:26:46 -05:00
Andreas Ehrencrona
ddf13211af
Updated to ESLint config 5.4.0 (#5541) 2020-10-21 15:23:08 -07:00
Ben McCann
229a16d6e7
upgrade ESLint config (#5472) 2020-09-29 20:19:43 -04:00
Ben McCann
0645631b28
Use TypeScript in tests (#5433) 2020-09-29 11:19:21 -04:00
Tan Li Hau
3970def5eb
fix sibling combinators with spread attributes (#5467) 2020-09-29 11:06:27 -04:00
Tan Li Hau
967b88186b
scope CSS sibling combinators (#5427) 2020-09-24 16:06:32 -04:00
Tan Li Hau
b5b02f8561
whitelist [open] attribute selector for <details> (#5425) 2020-09-18 13:53:19 -04:00
Tan Li Hau
46d423d9db
fix css specificity for child combinator (#5399) 2020-09-15 08:39:57 -04:00
Tan Li Hau
7900e3eafa
fix style scoping with > * (#5400) 2020-09-15 08:32:55 -04:00
Antony Jones
82dc26a31c
Fix lint warnings (#5263) 2020-08-20 08:51:28 -07:00
Zachiah
0e1345548f
add selector to message of css-unused-selector warning (#5253) 2020-08-12 16:57:04 -04:00
Bassam Ismail
fb51dd8f07
add a11y-media-has-caption check (#5075) 2020-08-05 12:21:44 -04:00
pushkin
0da70f46b9
handle line ending differences in tests (#4915) 2020-05-28 12:36:27 -04:00
Conduitry
be9b79f805
fix detection of unused partially global CSS selectors (#4332) 2020-01-27 18:25:24 -05:00
Conduitry
e4460e38ba
fix '~=' and class selectors with arbitrary whitespace (#4286) 2020-01-19 13:36:22 -05:00
Tan Li Hau
c0dab9fefb fix css specificity (#4146)
Co-authored-by: Almaz <gouffr@gmail.com>
2019-12-23 14:21:29 -05:00
Rich Harris
46fef94a5c
Merge pull request #3866 from tanhauhau/tanhauhau/improve-testing-experience
improve testing experience
2019-11-14 16:56:52 -05:00
Tan Li Hau
b22abc7936 fix undefined class with scoped-css 2019-11-08 21:54:11 +08:00
Tan Li Hau
d8b9274697 update test snapshot with --update flag 2019-11-07 08:34:19 +08:00
Tan Li Hau
798a47b1da feat unused css selector understands string concat 2019-10-31 01:02:34 +08:00
Rich Harris
b59c942e5a
Revert "remove empty value declaration from style tree" 2019-10-28 10:27:08 -04:00
Tan Li Hau
1a476d4580 remove empty value declaration from style tree 2019-10-28 10:08:20 +08:00
Jesse Skinner
b6798e5221 allow multiple ancestors to be scoped with class (#3544) 2019-10-24 13:34:58 -04:00
Tan Li Hau
5dbb08d19b allow solo for test suite (#3747) 2019-10-23 14:52:49 -04:00
Rich Harris
b9f14846b0
Structured code generation (#3539) 2019-10-16 10:57:23 -04:00
Conduitry
3c5ccf6ee5
rework attribute selector matching to not use regexes (#1710) 2019-09-16 19:35:41 -04:00
Christian Kaisermann
b286fdc26b Support other atrules (#2995)
* Add test for @page/@import/@charset/@namespace/@font-face

* Add support for declarations inside at-rules

* Quick formatting adjustment
2019-09-03 19:47:19 -04:00
Conduitry
45a54c1aa4 use bindings when matching attribute selector against element (#3281) 2019-08-02 19:31:04 -04:00
Rich Harris
8c1f48f828
Merge pull request #3250 from davemo/fix/1705-root-pseudo-selector-prefix-exemption
bugfix: exempt the :root psuedo-selector from the random css prefix
2019-07-23 07:45:29 -04:00
David Mosher
1909bb43d9 bugfix: exempt the :root selector from prefix
- the change in #1705 introduced a small bug for users who were relying on assigning global CSS variables via the :root selector
- this change adds a small exemption to avoid prefixing :root with the random prefix that svelte adds
2019-07-15 19:18:18 -04:00
pynnl
c33e4be6dc fix global keyframes with no elements 2019-07-12 06:36:34 -04:00
Rich Harris
bff7dace5b Merge branch 'gh-3135' of https://github.com/btk5h/svelte into btk5h-gh-3135 2019-07-01 12:53:21 -04:00
Richard Harris
0fd34b1f41 add scoping attribute for pseudo-class selectors without a type/class - fixes #1705 2019-06-30 17:39:57 -04:00
Bryan Terce
f654dd0ae4
Add tests 2019-06-29 15:22:31 -07:00
Richard Harris
234db33eb4 add test for class: directive special characters 2019-06-06 07:44:15 -04:00
Richard Harris
80ce72362b update css tests 2019-03-15 23:12:54 -04:00
Richard Harris
248f55a574 move warnings out of stats 2019-02-18 13:54:27 -05:00
Richard Harris
3953c2dbfc error on invalid compiler options — closes #2094 2019-02-17 13:10:37 -05:00
Richard Harris
f1d4ff6268 remove onwarn option, just use stats.warnings instead 2019-02-17 12:42:48 -05:00
Rich Harris
206a3d0131 update tests 2019-02-08 09:32:36 -05:00
Rich Harris
687e352209 rename .html files to .svelte 2019-02-08 08:48:10 -05:00