-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Custom style tag #5639
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
Closed
Closed
Custom style tag #5639
Changes from 25 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
ba5ee7a
#3940 add option to append styles on an element other than document.head
ivanhofer 28a29bb
#3940 append styles on an element other than document.head
ivanhofer 8718229
Merge remote-tracking branch 'origin/master' into customStyleTag
ivanhofer 4026fb0
Merge remote-tracking branch 'upstream/master' into customStyleTag
ivanhofer f2221fc
#3940 use @noop instead of null
ivanhofer 9ad664e
#3940 refactor check if style is already present
ivanhofer 0968e55
#3940 revert auto-formatting changes
ivanhofer a664d7d
Merge remote-tracking branch 'upstream/master' into customStyleTag
ivanhofer c0ac80f
add 'noop' param to all tests
ivanhofer 7bd2ed6
add 'noop' param to some more tests
ivanhofer bf528d1
add missing css to customElement constructor
ivanhofer 5ad396b
refactor add styles method call to reduce generated output
ivanhofer c154895
init $$ in component with empty object value
ivanhofer 675d6dd
Revert "add 'noop' param to some more tests"
ivanhofer ae47317
Revert "add 'noop' param to all tests"
ivanhofer f5f56ce
pass correct add_css method
ivanhofer 9a4cf3c
remove noop from from customElement init
ivanhofer 83d5fe8
fix tests using new add_css methods
ivanhofer bf87612
Revert "init $$ in component with empty object value"
ivanhofer b80990d
rename 'that' to 'component'
ivanhofer 4f9a15e
slightly improve output size by refactoring add_css method
ivanhofer b0cacd7
slightly improve output size by refactoring add_css method
ivanhofer 5c3038c
fix tests
ivanhofer 6d85265
move document.head to addCssToComponent method
ivanhofer b6e9574
use snake_case for method names
ivanhofer e8065eb
don't save customStyleTag in component.$$
ivanhofer b38e2b7
refactor add_css_to_component to not save customStyleTag in component.$$
ivanhofer f611abc
fix failing tests
ivanhofer 7b56dba
Merge branch 'master' into customStyleTag
ivanhofer d54ab8c
move append_styles function to dom.ts
ivanhofer ada8969
fix failing tests
ivanhofer 801001d
add docs for customStyleTag
ivanhofer a474470
Merge branch 'master' into customStyleTag
ivanhofer 9c82611
Merge branch 'master' into customStyleTag
ivanhofer 54d3e91
add customStyleTag to component constructor options
ivanhofer ee78985
update style_manager to use customStyleTag
ivanhofer 903e410
Merge branch 'master' into customStyleTag
ivanhofer 7a79cfc
Merge branch 'master' into customStyleTag
ivanhofer 901204e
add customStyleTag to component constructor options
ivanhofer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i understand that doing this was to make the code size for the base case unchanged.
but i'm ambivalent of doing this.
what do you think @Conduitry
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only option without additional code for the base output is to rewrite the function
add_css_to_component
to this:But then it is a "hidden" property on the class itself.
I chose the option to include it in the $$ context object because that's why the context object exists.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another solition could be to save the information in a variable like the current_component: