Skip to content

Fix scoped styles for component as root node #87

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

Merged
merged 3 commits into from
Nov 17, 2020

Conversation

tronsha
Copy link
Collaborator

@tronsha tronsha commented Nov 16, 2020

If the root node is a component, the scoped styles were not handled properly. This has now been fixed.

@tronsha tronsha requested a review from Macavity November 16, 2020 10:45
@@ -437,13 +437,20 @@ private function preparePropertiesForInclude(array $variables, bool $isRootNode
} elseif ($name === '__DATA_SCOPED_STYLE_ATTRIBUTE__') {
unset($variables[$key]);
if ($hasScopedStyleAttribute) {
continue;
foreach ($variables as $variable) {
if ($variable->getName() === 'dataScopedStyleAttribute') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A constant would make sense to avoid easy misspelling

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I maybe might add that later.

@tronsha tronsha merged commit d4d57a8 into Paneon:master Nov 17, 2020
@tronsha tronsha deleted the bugfix/class-for-component-on-root branch December 29, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants