Closed (fixed)
Project:
radix
Version:
6.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2024 at 08:16 UTC
Updated:
3 Oct 2024 at 08:19 UTC
Jump to comment: Most recent
Component stylesheets (such as https://git.drupalcode.org/project/radix/-/blob/6.0.x/components/accordi...) currently include _init.scss (https://git.drupalcode.org/project/radix/-/blob/6.0.x/src/kits/radix_sta...). However, this excludes custom stylesheets, which are included in main.style.scss (https://git.drupalcode.org/project/radix/-/blob/6.0.x/src/kits/radix_sta...).
One way would be duplication of
@import "base/functions";
@import "base/helpers";
in every component (I believe that including of _elements.scss and _typography.scss stylesheets probably isn't needed). Perhaps there's a better way, though.
Comments
Comment #2
doxigo commentedThe ideal way would be to use
@useinstead of@importfor sure but Bootstrap is not yet supporting that, hopefully in bootstrap6.xon the other hand
_init.scsscontains the following:So that's not with
_elements.scssor_typography.scssThe main reason we are including init, is to make sure we have access to our variables, mixins and so on. It might not be ideal due to lack of
@usebut it can be just fine as is for now, you can always remove that manually.Unless you have a better suggestion, I think it is safe to keep it as is.
Comment #3
milos.kroulik commentedPerhaps we could import custom functions in
_init-scssdirectly below@import "~bootstrap/scss/functions";? Looking at https://getbootstrap.com/docs/5.3/customize/sass/#importing I believe it should be fine. Helpres probably aren't needed, after all.Comment #4
doxigo commentedI suspect we should update the init, just noticed that we are not adding the
rootnot sure if we can decide for each project what's needed or not. The idea is to ship with the features, people can opt-out and comment out what they don't need.
Comment #5
milos.kroulik commentedShould I create a MR?
Comment #6
doxigo commenteddefinitely, I would appreciate it, thanks
Comment #7
doxigo commentedPushed an update Milos, thanks for bringing this up