Modular Sass build — component→partial mapping and procedure
Build a stylesheet containing only what the app uses, from the library's own SCSS sources. This is the "Option C" pattern from the Modular guide.
Prerequisites
# with the project's own package manager (pnpm add, yarn add) if it isn't npm
npm install bulma
npm install -D sasssass is Bulma's own compiler, dev-only. Vite compiles .scss out of the box — no plugin.
bulma has to be a dependency of the app itself: bestax-bulma depends on it, but under pnpm's
default layout the app's Sass can only load the packages the app lists. The library
publishes its SCSS sources (src/scss ships in the npm package, exposed via the
@allxsmith/bestax-bulma/scss/* export).
The required base — always first
// Configure shared variables FIRST — a Sass module can only be configured on
// its first load, and every Bulma module loads utilities internally. The
// prebuilt bestax flavors set this brand primary; omit it and is-primary
// reverts to Bulma's default turquoise (verified failure mode).
@use 'bulma/sass/utilities' with (
$primary: #1e6b99
);
// Required: reset + CSS variable definitions
@use 'bulma/sass/base';
@use 'bulma/sass/themes';base— minireset, generic element styles, keyframes.themes— registers the--bulma-*custom properties (colors, radii, schemes) and light/dark setup. Without it, components render unstyled-looking because every color resolves to nothing.- Exception:
bulma/sass/grid/columnsandbulma/sass/grid/gridregister their own CSS vars and can technically stand alone — include base + themes anyway; it is the safe default.
Component → partial mapping
Rule: stock Bulma components map to bulma/sass/<category>/<lowercased-name>; bestax
extras map to @allxsmith/bestax-bulma/scss/<category>/<lowercased-name>. Components that
are pure stock Bulma (Hero, Level, Media, …) have no extras partial —
Bulma's own module is all they need.
Bulma groups its form controls, so their modules don't follow the name: Input and TextArea
are bulma/sass/form/input-textarea, Checkbox, Checkboxes, Radio and Radios are
bulma/sass/form/checkbox-radio, and Field and Control are bulma/sass/form/tools.
Select and File follow the rule.
Stock Bulma examples:
@use 'bulma/sass/elements/button'; // Button, Buttons
@use 'bulma/sass/elements/box'; // Box
@use 'bulma/sass/elements/notification'; // Notification
@use 'bulma/sass/elements/title'; // Title, SubTitle
@use 'bulma/sass/form/input-textarea'; // Input, TextArea
@use 'bulma/sass/form/select'; // Select, plus bestax's form/select (see below)
@use 'bulma/sass/form/tools'; // Field, Control
@use 'bulma/sass/components/card'; // Card
@use 'bulma/sass/components/modal'; // Modal
@use 'bulma/sass/components/navbar'; // Navbar
@use 'bulma/sass/grid/columns'; // Columns, Column
@use 'bulma/sass/grid/grid'; // Grid, Cell
@use 'bulma/sass/layout/container'; // Container
@use 'bulma/sass/layout/section'; // SectionA stock component that bestax adjusts, such as Box, Button or Card, also wants its bestax
partial beside Bulma's module; see the notes below.
Authoritative bestax extras inventory
Every extras partial that exists, from the library's src/scss/**/_index.scss. The Modular
guide's Option C shows a short example and links here for the full list:
Components (@allxsmith/bestax-bulma/scss/components/<name>):
loading, collapse, tooltip, popover, hovercard, contextmenu, dropdown, steps, sidebar,
toast, dialog, modal, carousel, lightbox, tabs, menu, tableofcontents, reveal, avatar, avatars,
badge, emptystate, timeline, treeview, scrollarea, command, datatable,
pagination, affix, floatbutton, navbar, panel, card, tour
Layout (@allxsmith/bestax-bulma/scss/layout/<name>): appframe, splitter, stack
Form (@allxsmith/bestax-bulma/scss/form/<name>):
checkbox, checkboxcard, radio, radiocard, switch, slider, numberinput, pininput,
rate, autocomplete, combobox, taginput, picker-popover, dateinput, timeinput,
datetimeinput, daterangeinput, file, fieldset, field, dropzone, colorpicker,
colorinput, passwordinput, treeselect, cascader, select
Elements (@allxsmith/bestax-bulma/scss/elements/<name>): box, button, colorswatch,
delete, descriptionlist, divider, iconbutton, kbd, linkbutton, loader, notification,
pre, progress, ringprogress, skeleton, stat, table, tag
Helpers (@allxsmith/bestax-bulma/scss/helpers/<name>): color, cursor, sizing, visibility
Notes:
The extras partial name is the component name lowercased (
Dialog→scss/components/dialog;NumberInput→scss/form/numberinput).Sass names a
@useafter the last part of its URL and refuses two with the same name in one file. A partial that extends a stock component often shares that name with the component's Bulma module (components/tabs,elements/notification), so give the bestax line a name of its own withas, the way the notes below do. The name changes nothing in the compiled CSS.Extras
Tabsextends stock Bulma tabs (it shows only the selectedTabs.Contentpanel, lays out the vertical variant, draws aTabs.Tab's focus ring and a disabled tab's look, moves Bulma's focus ring inside a link that is aTabs.Item's own child, in the tab's text color on a selected toggle tab, brings a focused toggle tab in front of its neighbors, and keeps the active tab marked in forced colors, where Bulma's colors for it are replaced), so an app usingTabsneeds both:@use 'bulma/sass/components/tabs'; @use '@allxsmith/bestax-bulma/scss/components/tabs' as bestax-tabs;The
visibilityhelpers partial extends stock Bulma's visibility helpers: it drawsis-sr-onlyat each breakpoint, which Bulma draws at every width only and the viewport visibility props write for'sr-only'(visibilityTablet="sr-only"). An app using those adds it, in either order with Bulma's own visibility helpers when it uses them too:@use 'bulma/sass/helpers/visibility'; @use '@allxsmith/bestax-bulma/scss/helpers/visibility' as bestax-visibility;The
menupartial extends stock Bulma menu (it drawsMenu.Section's heading and chevron, starts each item's text at the right on a right-to-left page, and keeps the active item marked in forced colors, Windows' contrast themes), so an app usingMenu, or aTableOfContents, which renders one, needs both, in either order, and thetableofcontentspartial for the latter:@use 'bulma/sass/components/menu'; @use '@allxsmith/bestax-bulma/scss/components/menu' as bestax-menu; @use '@allxsmith/bestax-bulma/scss/components/tableofcontents'; // TableOfContents onlyThe
modalpartial extends stock Bulma modal (a modal card keeps an edge in forced colors, Windows' contrast themes, where Bulma's card has none and the backdrop's dark fill is replaced), so an app usingModalwith a card needs both, in either order:@use 'bulma/sass/components/modal'; @use '@allxsmith/bestax-bulma/scss/components/modal' as bestax-modal;The
paginationpartial extends stock Bulma pagination (the links' keyboard focus ring, which Bulma's own styles turn off, the current page marked in forced colors, where Bulma's colors for it are replaced, and a disabled control drawn there at full strength in the system's disabled color, where Bulma's half opacity would fade it), so an app usingPagination, or aDataTablewith pages, whose pager is one, needs both, in either order:@use 'bulma/sass/components/pagination'; @use '@allxsmith/bestax-bulma/scss/components/pagination' as bestax-pagination;The
dropdownpartial extends stock Bulma dropdown (it draws a divider in CanvasText in forced colors, where Bulma's fill takes the menu's own Canvas color, marks an active item there with a bar in Highlight, as Menu's partial does, and outlines the open menu there in place of Bulma's shadow), so an app usingDropdown, or aContextMenu, whose menu is Bulma's dropdown markup, needs both, in either order:@use 'bulma/sass/components/dropdown'; @use '@allxsmith/bestax-bulma/scss/components/dropdown' as bestax-dropdown;The
navbarpartial extends stock Bulma navbar (it keeps the burger's bars in ButtonText andNavbar.Dividerin CanvasText in forced colors, where Chromium paints the bars in the page's Canvas color and Bulma's fill takes the menu's, draws an open dropdown's edge there from the desktop breakpoint up as a CanvasText outline, where Bulma's shadow is dropped, marks the active item there with a bar in the system's highlight color, where Bulma's colors for it are replaced, keeps afixednavbar, or one Bulma's-touchor-desktopfixed classes fix, in place while an overlay locks the page's scrolling, pads the page's scroll by such a navbar's height so a control that takes focus doesn't scroll under it, gives an active item's text the invert of the link color it sits on, where Bulma's leaves it in the navbar's text color, draws a navbar in a coloredHeroin the hero's colors, where Bulma's draws its active item and burger in the link color, and, in a build with a class prefix, draws a dropdown's active link row, other than a tab, as it draws without one, where Bulma's draws it as a plain row), so an app usingNavbarneeds both, in either order.AppFrame.BurgerrendersNavbar.Burger, so a build with one wants this partial too:@use 'bulma/sass/components/navbar'; @use '@allxsmith/bestax-bulma/scss/components/navbar' as bestax-navbar;The
panelpartial extends stock Bulma panel (it keeps the heading of a panel with nocolorreadable on the dark scheme, where Bulma writes it white on light gray, and a colored panel's active block and tab, their text, icon and underline, readable on both schemes, and keeps the panel's edge drawn and the active block and tab marked in forced colors, which drop Bulma's shadows and replace its colors for them), so an app usingPanelneeds both, in either order:@use 'bulma/sass/components/panel'; @use '@allxsmith/bestax-bulma/scss/components/panel' as bestax-panel;The
filepartial extends stock Bulma file (File's keyboard focus ring, a file dropped on its button or name reaching its input, which Bulma's module draws them over, and the rounded corners of a boxedhasNameFile with no name to show), so an app usingFileneeds both, in either order:@use 'bulma/sass/form/file'; @use '@allxsmith/bestax-bulma/scss/form/file' as bestax-file;The
selectpartial extends stock Bulma select (an outline on a focusedSelectin forced colors, where Bulma's focus ring is a shadow those themes drop, and a disabled one's arrow in the system's disabled color there, at full strength), so an app usingSelectneeds both, in either order:@use 'bulma/sass/form/select'; @use '@allxsmith/bestax-bulma/scss/form/select' as bestax-select;The
fieldpartial extends stock Bulma's field (bulma/sass/form/tools): it puts themessageof a horizontal form component (Input horizontal,Checkboxes horizontal,Rate horizontaland the rest) under its control, where Bulma's row would set it beside, and keeps a horizontal label's text against its control on a right-to-left page. An app with one needs it next tobulma/sass/form/tools, in either order:@use 'bulma/sass/form/tools'; @use '@allxsmith/bestax-bulma/scss/form/field';Dropzone's zone is Bulma's file widget, so an app using it needsbulma/sass/form/fileand thefilepartial (its keyboard focus ring) next toscss/form/dropzone, plusbulma/sass/elements/deleteand thedeletepartial for the remove buttons andbulma/sass/form/toolsfor its help lines.DateInput/TimeInput/DateTimeInputalso needpicker-popover.Calendaris the pickers' calendar on the page, so it needsdateinput, which draws its frame and its months too, and nopicker-popover.DateRangeInputneedsdaterangeinputfor its field anddateinputfor its calendar, andpicker-popovertoo.CheckboxCardandRadioCardare Bulma cards, so an app using them needsbulma/sass/components/cardnext toscss/form/checkboxcardorscss/form/radiocard, andbulma/sass/form/checkbox-radiofor theCheckboxesandRadiosgroups around them.ColorPickerdraws its swatches and its preview withColorSwatch, and its value field and eye dropper button are Bulma's, so an app using it needsscss/elements/colorswatch,bulma/sass/form/input-textareaandbulma/sass/elements/buttonnext toscss/form/colorpicker, andbulma/sass/form/toolsfor the label and help text around it.ColorInputopens aColorPickerin the pickers' popover, so it needscolorpicker(and what that needs) andpicker-popovernext tocolorinput.PasswordInputlays its button over a Bulma input, so an app using it needsbulma/sass/form/input-textareanext toscss/form/passwordinput, andbulma/sass/form/toolsfor the label and help text around it.TreeSelectopens aTreeViewin the pickers' popover, so it needscomponents/treeview,form/checkboxfor its boxes andpicker-popovernext totreeselect, withbulma/sass/form/input-textarea,bulma/sass/elements/tag,bulma/sass/elements/deleteandelements/deletefor the field, the tags and the clear button.Cascaderopens its columns in the pickers' popover, with aComboboxlist for its search, and its items are Bulma's dropdown items. Its partial bringsform/comboboxwith it, for the search and the values its items start from, so it needspicker-popoverandbulma/sass/components/dropdownnext tocascader, withbulma/sass/form/input-textarea,bulma/sass/elements/deleteandelements/deletefor the field and the clear button, andbulma/sass/elements/loader,elements/loaderandbulma/sass/elements/buttonfor a column that's loading or failed to load.PinInput's boxes are Bulma inputs, so an app using it needsbulma/sass/form/input-textareanext toscss/form/pininput, andbulma/sass/form/toolsfor the label and help text around it.Popover.Closerenders a Bulma button, so an app using it needsbulma/sass/elements/buttonnext toscss/components/popover.IconButtonis a Bulma button holding an icon, so an app using it needsbulma/sass/elements/buttonandbulma/sass/elements/icon. Theiconbuttonpartial makes a rounded one a circle, where Bulma'sis-roundedgives a pill, and keeps thetextandghostlooks from underlining the glyph. Its rules win over Bulma's either way, so the order of the@uselines does not matter.CopyButtonis a Bulma button holding an icon and a label, with no partial of its own, so an app using it needsbulma/sass/elements/buttonandbulma/sass/elements/icon. WithshowLabel={false}it's anIconButton, so addiconbuttonfor a rounded one to be a circle.AppFrame.Nav railshows each label of its rail in aTooltip, so an app with a rail needsscss/components/tooltipnext toscss/layout/appframe, plus Menu's two partials (above), which set the menu's icons.Tourdraws a step's Skip, Back and Next as Bulma buttons and its close button as a delete button, so an app using it needsbulma/sass/elements/button,bulma/sass/elements/deleteand thedeletepartial next toscss/components/tour.ContextMenu's menu is Bulma's dropdown markup, so an app using it needsbulma/sass/components/dropdownand thedropdownpartial above next toscss/components/contextmenu.Dialogis drawn inside Bulma's modal, which makes it an overlay, with Bulma buttons for its actions, so an app using it needsbulma/sass/components/modal,bulma/sass/elements/buttonand thebuttonpartial next toscss/components/dialog. Without the modal module the dialog sits in the page's flow with no backdrop. ACommand.Dialogis drawn inside the modal too, so an app with one needs it besidescss/components/command.Lightbox's viewer is Bulma's modal, with Bulma buttons for its controls and aLoaderfor a slow image, so an app using it needsbulma/sass/components/modal,bulma/sass/elements/buttonandbulma/sass/elements/loadernext toscss/components/lightbox, and thedeletepartial below for its close button's target and forced colors.Loaderis stock Bulma styled bybulma/sass/elements/loader, and theisLoadingspinners onButton,ControlandSelectare Bulma's too. Theloaderextras partial stops all of them underprefers-reduced-motion: reduce, hides everything inside a loading button where Bulma hides only the label, outlines a loading button that has keyboard focus, whose focus shadow Bulma takes away, and keeps each ring open in forced colors (Windows' contrast themes), so include it (as bestax-loader) next to the Bulma modules in any build that shows one. Its rules win over Bulma's either way, so the order of the two@uselines does not matter.Progressand the skeletons are stock Bulma too (bulma/sass/elements/progress,bulma/sass/base/skeleton). Theprogressandskeletonextras partials (as bestax-progress,as bestax-skeleton) stop the indeterminate bar's sweep and the skeleton pulse (Skeleton, theskeletonprop,hasSkeleton) underprefers-reduced-motion: reduce, in either order. Theprogresspartial also keeps the bar drawn in forced colors, its fill and an edge in the text color, where Bulma's module leaves the whole bar the page's color. Theskeletonpartial keeps each shape drawn there too, inGrayText, with the text Bulma hides still hidden, where Bulma's module leaves the shape the page's color and shows that text.Notificationis stock Bulma too (bulma/sass/elements/notification). Thenotificationextras partial pads the end of one with a close button (hasDelete, or aDeletepassed in) so its text clears the button, and gives a dark or light one its color's own text and background, and a white or black one withisLightthe light color's text, where Bulma's module lets its text inherit the color around it. Include it (as bestax-notification) next to the Bulma module in any build that shows a dismissible, dark or light notification, or a white or black one withisLight. It doesn't depend on the order of the two@uselines either.Tagis stock Bulma too (bulma/sass/elements/tag). Thetagextras partial gives a light tag, and a white, black or dark one withisLight, text that reads on its light background, where Bulma's module lets its text inherit the color around it, which on the dark scheme leaves it hard to read, sets a normal-size tag in a table cell at the bottom of its line, where Bulma's baseline makes the row taller than a row of text, and gives a button tag (as="button",isDelete) the weight, spacing and other text a span tag takes from the text around it, where the browser gives a button its own. Include it (as bestax-tag) next to the Bulma module in any build that shows one of those tags, a tag in a table or a button tag. It doesn't depend on the order of the two@uselines either.Deleteis stock Bulma too, and it's the close button ofNotification,Message,Toast, aModalcard,AppFrame's drawer and the tags ofTaginput,Combobox,DropzoneandTreeSelect. Bulma draws it inbulma/sass/elements/delete, and the modules of the components it sits in don't, so a build that shows one needs that module next to theirs. Without it the button doesn't show, though it still takes keyboard focus. TheModal's floating close is the exception, sincebulma/sass/components/modaldraws that one itself. Bulma draws the circle and cross as background colors, which forced colors (Windows' contrast themes) replaces, so they vanish there. Thedeleteextras partial keeps them drawn in the system's button colors, and theModal's floating close andTag isDelete(bulma/sass/elements/tag) with them. It also gives the delete button and the floating close a target at least 24px square around the circle, WCAG 2.5.8's minimum, where Bulma's is 20px or 16px small, so without it a press just beside the circle misses. Include it (as bestax-delete) in any build that shows a close button. Its rules win over Bulma's either way, so the order of the@uselines does not matter.Buttonis stock Bulma too (bulma/sass/elements/button). Bulma shows a focused button with its border and a shadow, which a ghost button doesn't have and a static one doesn't show, and forced colors (Windows' contrast themes) drops the shadow and sets the border's color, so a focused button can look like an unfocused one there. Forced colors also replaces a colored button's fill, which Bulma draws with no border, so an icon-only one shows only its glyph there. Thebuttonextras partial gives those focused buttons an outline, and a focused disabled link one, apart from a loading one, which theloaderpartial outlines, a pressedToggleButton, a checkedSegmentedControlsegment and any other button with Bulma'sis-selectedthe system's highlight colors in forced colors, where the fill that marks them is replaced, a colored button a 1px border in forced colors, a disabled button full strength in forced colors, where Bulma's disabled opacity would fade the system's color for it, a linkButtonwithisDisabledthe look Bulma gives a disabled<button>, since Bulma draws only thedisabledattribute, which a link doesn't get, and an outlined button the lightness Bulma picks for its color's text on the page where that's lighter, so a dark color reads on the dark scheme, so include it (as bestax-button) in any build that loads Bulma's button module. Its rules win over Bulma's either way, so the order of the@uselines does not matter.Boxis stock Bulma (bulma/sass/elements/box), which draws a box's edge as a shadow with no border. Forced colors (Windows' contrast themes) drops every shadow and paints the box in the page's own color, so its edge vanishes there. Theboxextras partial draws it back as an outline in the system's text color, so include it (as bestax-box) next to Bulma's module in any build that shows aBox. Its rule wins over Bulma's either way, so the order of the@uselines does not matter.Cardis stock Bulma (bulma/sass/components/card), which draws a card's edge as a shadow the same way, so it vanishes in forced colors too, and the line under its header with it. Thecardextras partial draws the edge back as an outline and the header's line as a line, in the system's text color, so include it (as bestax-card) next to Bulma's module in any build that shows aCard. Its rule wins over Bulma's either way, so the order of the@uselines does not matter.Dividerrenders an<hr>, which Bulma draws in its base (bulma/sass/base) as a background color with no border. Forced colors (Windows' contrast themes) replaces that color with the page's own, so the line vanishes there. Thedividerextras partial draws it as a border in the system's text color, so include it in any build that shows aDivideror an<hr>. Its rule wins over Bulma's either way, so the order of the@uselines does not matter, and an<hr>with a class of its own keeps its own rules.Preis a<pre>, which Bulma styles in its base (bulma/sass/base) and scrolls sideways when a line runs long. While it overflows,Preis a tab stop, and thepreextras partial draws its keyboard focus ring in Bulma's focus color, so include it in any build that shows aPre. Bulma styles no focus on a<pre>, so the order of the@uselines does not matter.Statslays its row out on Bulma's smart grid (.gridandis-col-min-*), so a build with aStatsrow wantsbulma/sass/grid/gridbeside thestatpartial, which only resets the row's margins.Tableis stock Bulma (bulma/sass/elements/table), andDataTablerenders one. The prebuilt stylesheets build it with$table-cell-text-align: start, so header cells line up with the body cells under them on a right-to-left page, where Bulma's default,left, keeps them on the left. A build with a table gets the same by configuring the module where it loads it:@use 'bulma/sass/elements/table' with ( $table-cell-text-align: start );The
tableextras partial draws the keyboard focus ring of a responsive table's container (isResponsive), which is a tab stop while the table overflows it, in Bulma's focus color, and marks a selected row or cell (Tr isSelected, and aDataTable's selected rows) with a double line in forced colors, where Bulma's fill for it is replaced. Include it next to the Bulma module in any build with a responsive table or selected rows:@use '@allxsmith/bestax-bulma/scss/elements/table' as bestax-table;Bulma's module sets no outline on the container or on a selected row or cell, so the order of the two
@uselines does not matter.Stock-Bulma form controls still need their Bulma module (
bulma/sass/form/…); the extras form partials above style only the bestax-specific behavior.Bulma's module for a component doesn't always style what bestax renders inside it. A close button is the common case: it needs
bulma/sass/elements/deleteand thedeletepartial, as theDeletenote above says.
Bulma helper categories
Include a helper module only if the app's helper props (or className strings) need it:
⚠️ The display prop (display="flex", is-flex, is-block, …) lives in visibility,
not flexbox — flexbox holds only the alignment props. Verified failure mode: omit
visibility and every display="flex" silently renders block.
// In Bulma's own order: its helpers are all !important with one class, so the
// later one wins, and is-sr-only comes after spacing, overflow and position.
@use 'bulma/sass/helpers/aspect-ratio'; // aspectRatio prop
@use 'bulma/sass/helpers/border'; // radius sizes (small/normal/large/rounded)
@use 'bulma/sass/helpers/color'; // color/backgroundColor props, has-text-*/has-background-*
@use 'bulma/sass/helpers/flexbox'; // flex* alignment props (justifyContent/alignItems/flexGrow…) — NOT display="flex"
@use 'bulma/sass/helpers/float'; // float/clearfix props
@use 'bulma/sass/helpers/gap'; // gap/columnGap/rowGap/gapless props, Grid's gap props included
@use 'bulma/sass/helpers/overflow'; // overflow/overflowX/overflowY props
@use 'bulma/sass/helpers/position'; // pos/relative/overlay props
@use 'bulma/sass/helpers/spacing'; // m*/p* props
@use 'bulma/sass/helpers/typography'; // textSize/textAlign/textTransform/textWeight/fontFamily
@use 'bulma/sass/helpers/visibility'; // display/visibility props incl. display="flex" (is-flex/is-block/is-hidden*)
@use '@allxsmith/bestax-bulma/scss/helpers/visibility' as bestax-visibility; // visibility*="sr-only" at a breakpoint (is-sr-only-tablet…)
@use 'bulma/sass/helpers/other'; // interaction, radius="radiusless", shadow="shadowless"With bulma/sass/helpers/color, include the color extras partial (as bestax-color) too. On
the dark scheme it gives a color's text (textColor, has-text-*) the color's on-scheme
lightness wherever that's the lighter one, so a dark color such as the bestax blue primary reads
there. It doesn't depend on the order of the two @use lines:
@use 'bulma/sass/helpers/color';
@use '@allxsmith/bestax-bulma/scss/helpers/color' as bestax-color;Procedure
- Inventory — list every component the app imports from
@allxsmith/bestax-bulma(grep the import statements; remember re-exports through local files). - Map — one
@useline per component via the rule above; add the helper categories the app's helper props require; dedupe. - Write
src/styles.scss— theutilitiesconfig first, then base + themes, then the mapped lines. - Swap the import — in
src/main.tsx/src/main.jsx, replace the prebuilt CSS import (bestax.cssorversions/*.css) withimport './styles.scss';. - Build and measure — raw + gzip, compare against the prebuilt baseline, report the delta.
- Verify visually — open the app; a missing partial shows up as an unstyled component,
an omitted helper module as ignored spacing/color props. Add the missing
@useline — never paper over it with custom CSS.
Worked example — the create-bestax starter app
The npm create bestax starter renders Container, Section, Columns/Column, Image,
Title/SubTitle, Box, Card, Buttons/Button, and Notification with its close
button: all stock Bulma, plus the notification and delete extras partials for that close
button, the button partial for the buttons' focus outline and edge in forced colors, and the
box and card partials for the boxes' and cards' edges in forced colors. Its helper
props are display (visibility), flexGrow (flexbox), and textAlign (typography);
it uses no spacing or color props. That inventory compiles to the following, verified
pixel-equivalent to the prebuilt complete flavor in headless Chromium (light and dark, phone
and desktop width, notification open), at 274 KB raw / 30 KB gzip vs 819 KB / 84 KB.
Scaffolded with an icon library, the starter also needs bulma/sass/elements/icon for its
IconText card titles:
// src/styles.scss
@use 'bulma/sass/utilities' with (
$primary: #1e6b99
);
@use 'bulma/sass/base';
@use 'bulma/sass/themes';
@use 'bulma/sass/elements/box';
@use 'bulma/sass/elements/button'; // Button + Buttons
@use 'bulma/sass/elements/delete'; // Notification's close button
@use 'bulma/sass/elements/image';
@use 'bulma/sass/elements/notification';
@use 'bulma/sass/elements/title'; // Title + SubTitle
@use 'bulma/sass/components/card';
@use 'bulma/sass/grid/columns';
@use 'bulma/sass/layout/container';
@use 'bulma/sass/layout/section';
@use 'bulma/sass/helpers/visibility'; // display="flex"
@use 'bulma/sass/helpers/flexbox'; // flexGrow
@use 'bulma/sass/helpers/typography'; // textAlign
@use '@allxsmith/bestax-bulma/scss/components/card' as bestax-card; // the edge and header line in forced colors
@use '@allxsmith/bestax-bulma/scss/elements/box' as bestax-box; // the edge in forced colors
@use '@allxsmith/bestax-bulma/scss/elements/button' as bestax-button; // focus outline and edge in forced colors
@use '@allxsmith/bestax-bulma/scss/elements/delete' as bestax-delete; // the close button's target, and in forced colors
@use '@allxsmith/bestax-bulma/scss/elements/notification' as bestax-notification; // text clears the close button// src/main.tsx — before
import '@allxsmith/bestax-bulma/bestax.css';
// after
import './styles.scss';A custom class prefix is $class-prefix in the same with (…) block as $primary, paired
with <ConfigProvider classPrefix="my-"> at the app root (the library's own
src/scss/versions/*.scss flavor builds use exactly this mechanism).