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

Global Styles Custom CSS: Add inline code completion and linting to input box similar to customizer #47945

Open
glendaviesnz opened this issue Feb 9, 2023 · 5 comments
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.

Comments

@glendaviesnz
Copy link
Contributor

What problem does this address?

The new Global styles Custom CSS input box currently doesn't have an inline code completion of linting, which can make editing of the CSS difficult.

What is your proposed solution?

Look to integration something like CodeMirror which is currently used by the Customizer custom CSS input box.

@creativecoder
Copy link
Contributor

This came up while I was working with a theme builder this week.

Related features that were also mentioned: auto indenting new lines and auto adding closing braces.

@annezazu
Copy link
Contributor

Noting that the current experience was brought up as a big deterrent in a recent blog post:

Additionally, the fact that the CSS editor lacks every fundamental feature, down to the lack of tab indent support, tells me that the Gutenberg team doesn’t ever want to see you writing CSS. The minute you take your coat off, they crank up the air conditioning. The message is clear, “Go somewhere else.”

@glendaviesnz
Copy link
Contributor Author

@creativecoder there is a draft PR here, which is mostly working, but there was a suggestion to hold off until the new lazy loading API was landed . I don't have time to follow this up right now, but happy for you to look at pushing this forward if you have the time.

@creativecoder
Copy link
Contributor

I don't have time to follow this up right now, but happy for you to look at pushing this forward if you have the time.

@glendaviesnz Thanks for pointing to that! I won't likely have time to work on this in the near future, but will put it on my list, just in case.

@okmttdhr
Copy link
Contributor

I'm proposing #60155.
For lazy-loading, I'm utilizing Webpack's import() for now (c.f., #53380 (comment)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants