Skip to content

Global Styles: Should we Allow CSS properties that we don't manage at the moment? #27231

Closed

Description

@jorgefilipecosta

In theme.json should we generate styles for properties we don't manage or provide an explicit UI control?
E.g. if a theme passes:

"core/paragraph": {
	"styles": {
		"textShadow": "2px 2px pink";
	}
}

Or

"core/paragraph": {
	"customStyles": {
		"textShadow": "2px 2px pink";
	}
}

Should we generate text-shadow styles for the paragraph or not?

Activity

  1. added
    Global Styles
    on Nov 24, 2020
  2. aristath commented on Nov 25, 2020

    @aristath
    Member

    YES!!!
    If we do this then we're getting closer to a full JSON-based theme. Technically there's nothing stopping us from doing this... If we don't do it, then theme-authors will just add them to a stylesheet. which is fine, but not as good as having a single-source-of-truth in the JSON file ❤️

  3. pagelab commented on Dec 1, 2020

    @pagelab
    Contributor

    If we do this then we're getting closer to a full JSON-based theme

    It would be truly awesome to see that happen.

  4. carolinan commented on Jan 22, 2021

    @carolinan
    Contributor

    This would be great or even necessary :)

  5. added
    Needs Decision
    on Mar 6, 2023
  6. added
    [Type] Enhancement
    on Sep 8, 2023
  7. youknowriad commented on Oct 24, 2024

    @youknowriad
    Contributor

    I think this is largely addressed with the "css" property today. Please let me know if this is not enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Global StylesNeeds Decision[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions