I would like to ask the author and everyone, what is the best way to modify the theme? #150
-
Or is there something better? I tried the above two methods, but it is difficult to avoid the problem of interactive use, that is, I always need to mix the above two methods to use them. In addition, when I want to use functions.php to add something to the menu, I have to jump to different files to implement styles. This is not what I want to encounter in tailwindcss. My understanding is that tailwindcss allows me to focus on html without the need to frequently jump between html and css This topic is perfect for me, I just want to find a good way, you have more experience, I want to learn from it What method would you suggest? If everyone uses mix, under what circumstances would you insist on modifying html, and under what circumstances would you insist on using @apply? Do you have any themes built by _tw? I'm curious what methods you used to develop it, thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello again, You might find this documentation page useful: Styling HTML from outside the theme I would say my short answer for you is that you should be adding classes to the HTML in your theme files directly 100% of the time. So if you're styling the header or footer or anything along those lines, the intention of the starter theme is for you to add classes to If you're trying to style the output from WordPress core, a plugin, JavaScript, etc., you will almost certainly want to use one of the methods described in the page linked above. You'll start to get a sense of when a brief run of context switching, e.g., to style a menu generated by Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hello again,
You might find this documentation page useful: Styling HTML from outside the theme
I would say my short answer for you is that you should be adding classes to the HTML in your theme files directly 100% of the time. So if you're styling the header or footer or anything along those lines, the intention of the starter theme is for you to add classes to
header.php
andheader-content.php
directly.If you're trying to style the output from WordPress core, a plugin, JavaScript, etc., you will almost certainly want to use one of the methods described in the page linked above. You'll start to get a sense of when a brief run of context switching, e.g., to style a menu generated by
wp_n…