understrap / understrap-child

The starter child theme for Understrap, the renowned open-source WordPress starter theme.
GNU General Public License v3.0
581 stars 331 forks source link

@extend classes with color doesn't work #326

Open melaniemuellerdesign opened 2 years ago

melaniemuellerdesign commented 2 years ago

Hey there,

Unfortunately, I can't @extend any classes at the moment if they contain a color. Understrap child has been updated to the latest version. How can I work around the problem without !optional?

Error: The target selector was not found. Use "@extend .text-dark !optional" to avoid this error.

I can avoid this problem using bootstrap 4 but I think it is not the final solution.

bacoords commented 2 years ago

Hmm. Where exactly are you using this?

If you're using it in src/sass/theme/_child_theme.scss you should be fine to use it.

However, if you're using it in a file that's also imported into src/sass/custom-editor-style.scss, then you'll need to make sure that custom-editor-style is importing the correct dependencies since we don't load the FULL bootstrap library for the editor stylesheet. To do this, add @import "assets/bootstrap5/bootstrap-utilities"; after line 13 so that the full utilities are loaded into the backend (planning to include a PR for this myself in the future)