• Tokatl

    (@dwqueretaro)


    Is it possible to set some global rules without enqueuing a css file through theme.json? something like for example

    html {
      font-size: 100%;
      box-sizing: border-box;
    }
    
    *,
    *::before,
    *::after {
      box-sizing: inherit;
    }
Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Yes, via PHP. You can use wp_add_inline_style() if you have other styles already enqueued for which you know the handle used.

    Or you could output your CSS in its own style block from the “wp_print_styles” action hook.

Viewing 1 replies (of 1 total)
  • The topic ‘Global settings on theme.json?’ is closed to new replies.