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

fix(assets/dfn-panel.css): remove on save #2846

Merged
merged 6 commits into from
Apr 17, 2020

Conversation

sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Apr 17, 2020

Fixes https://github.com/w3c/respec/issues/2845


Outdated **Revert this PR as soon as validator is fixed.**

w3c/css-validator doesn't support custom properties yet (w3c/css-validator#111), so echidna failed to publish.
Setting position of panel via panel.style.left is straightforward, but setting left for .dfn-panel::before (the caret/triangle), JS won't allow. We would have to change the markup otherwise - which is something I'm not sure I want to do.

God forgive me, for this hack 🙏
Update: Hack removed, changed markup instead.

@sidvishnoi

This comment has been minimized.

@sidvishnoi sidvishnoi force-pushed the hotfix/css-variable-validation branch from deec8b9 to fcc0c9a Compare April 17, 2020 11:31
@sidvishnoi sidvishnoi changed the title fix(assets/dfn-panel.css): workaround css-validator errors fix(assets/dfn-panel.css): remove on save Apr 17, 2020
Copy link
Collaborator

@saschanaz saschanaz left a comment

Choose a reason for hiding this comment

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

No builds/ update here 😉

@@ -10,7 +10,7 @@ export const name = "core/dfn-panel";
export async function run() {
const css = await loadStyle();
document.head.insertBefore(
hyperHTML`<style>${css}</style>`,
hyperHTML`<style class="removeOnSave">${css}</style>`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

We want to enable dfn panel on saved documents, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we want to. but not yet. gotta fix echidna breakage first. will add it back with the fix in https://github.com/w3c/respec/pull/2820

Copy link
Member Author

@sidvishnoi sidvishnoi Apr 17, 2020

Choose a reason for hiding this comment

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

Did you get a change to see other two attempts?
w3c@86e8f5a is good if we want a workaround on css-validator, but way too hacky. I don't see any updates on css-validator fix, so that hack might stay in for a long time.
w3c@fcc0c9a is good practice, but I don't like adding markup for decorative changes.

@sidvishnoi
Copy link
Member Author

No builds/ update here wink

Will need to send another PR for builds/ then. Because release script no longer generates w3c-common. What do you prefer - here or a new PR?

@saschanaz
Copy link
Collaborator

Because release script no longer generates w3c-common. What do you prefer - here or a new PR?

Updating w3c-common here sounds fine.

@sidvishnoi sidvishnoi merged commit 2f325a1 into develop Apr 17, 2020
@sidvishnoi sidvishnoi deleted the hotfix/css-variable-validation branch April 17, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to publish because of CSS validator issues
3 participants