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

[ShadyCSS] Improve transparency and remove need to use custom API from ShadyCSS #31

Open
5 tasks
dfreedm opened this issue Sep 22, 2017 · 11 comments
Open
5 tasks

Comments

@dfreedm
Copy link
Contributor

dfreedm commented Sep 22, 2017

ShadyCSS v1 has a lot of limitations that keep hitting users right in the face.

It's time to fix that, and make ShadyCSS totally (mostly) transparent.

Current API should probably stay the same, but will become entirely optional performance enhancements. However, the behavior change is probably enough to warrant a breaking change.

Enhancements:

  • Automatically handle top-level styles
    • No more need for <custom-style> or CustomStyleInterface
  • Let arbitrary elements like <div> have scoped shadowroots
    • Only custom elements are supported right now
  • Handle multiple stylesheets
    • Better for everyone!
  • Make ::slotted work better
    • Handle redistribution sanely
    • Remove as many of the weird corner cases with the current scheme as possible
  • Handle dynamic changes to # of stylesheets
    • Scope the root based on the ordered set of stylesheets contained in the root
@dfreedm dfreedm self-assigned this Sep 22, 2017
dfreedm referenced this issue in webcomponents/shadycss Sep 22, 2017
Remove the need to explicitly call into CustomStyleInterface

Related to #134
@abdonrd
Copy link
Contributor

abdonrd commented Oct 9, 2017

Any opinions about drop the @apply shim?

@OmidHekayati
Copy link

Why continue use of @apply || mixin spec when it is obsolete!!! and never get standard:
http://www.xanthir.com/b4o00
This spec isn't yet approved by the relevant Working Group:
https://tabatkins.github.io/specs/css-apply-rule/
and I think never approve by any browsers. Chrome close related issue:
https://www.chromestatus.com/feature/5753701012602880

@dfreedm
Copy link
Contributor Author

dfreedm commented Oct 11, 2017

@abdonrd @OmidHekayati Dropping the @apply shim is definitely something I want to do, but I want to have a few deprecation cycles before removing it completely. The improvements I want to make to ShadyCSS will still be beneficial to Polymer 2 users, where @apply is still supported.

That said, as soon as ::part or an equivalent is specced, I could be more amenable to a rapid deprecation of @apply

@OmidHekayati
Copy link

@azakus
The one downside of ::part() is that it only works for shadow DOM
I think it is better to announcement in shadycss readme that @apply will never be specced and developers must have plan to change usage of it.

@abdonrd
Copy link
Contributor

abdonrd commented Oct 11, 2017

@azakus thanks! ::part or an equivalent would be really great!

@tomalec
Copy link
Contributor

tomalec commented Feb 1, 2018

Are there any news, plans or estimates for this issue? The issues with lack of API (and build in support) for different shadow DOM for native and custom elements are still effectively blocking us to migrate to V1 :(

I could try to prepare some PRs for extending this PR, but I'm not sure if you even consider them given, planned refactoring.

@equinusocio
Copy link

Any update? :D

@haugthom
Copy link

+1

@dfreedm dfreedm transferred this issue from webcomponents/shadycss Jun 7, 2019
dfreedm pushed a commit that referenced this issue Jun 11, 2019
changes for IE11 compatibility.
dfreedm pushed a commit that referenced this issue Jun 11, 2019
Expose native HTMLElement so that it can be modified by other polyfills.
@abdonrd
Copy link
Contributor

abdonrd commented Jun 12, 2019

@azakus #125 close this issue...? 🤔

@dfreedm
Copy link
Contributor Author

dfreedm commented Jun 13, 2019

Whoops, that's weird

@dfreedm dfreedm reopened this Jun 13, 2019
@dfreedm dfreedm added Severity: High Type: Feature New feature or request labels Jun 13, 2019
@dfreedm dfreedm changed the title ShadyCSS v2 [ShadyCSS] Improve transparency and remove custom API from ShadyCSS Jun 13, 2019
@dfreedm dfreedm changed the title [ShadyCSS] Improve transparency and remove custom API from ShadyCSS [ShadyCSS] Improve transparency and remove need to use custom API from ShadyCSS Jun 13, 2019
@stale
Copy link

stale bot commented Apr 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants