Remove LESS stylesheets and dependencies (#27409)

* Remove components, core and modules LESS stylesheets

* Remove variables LESS stylesheets

* Remove app LESS stylesheets

* Remove github-sync, onboarding LESS stylesheets

* Remove main-light and IEEE LESS stylesheets

* Remove Less loader configuration

* Remove bootstrap-3 entrypoint

* Rename bootstrap-5 entrypoint to bootstrap

* Remove bootstrap-5 CSS folder and move stylesheets

* Update CSS variables

* Restore and update github-sync.scss path

* Fix try-premium.scss path and fix undefined mixin error

* Restore entrypoints

* Simplify buildCssPath to always use main-style.css

* Remove less from prettier formatting scripts

* Remove less from addHook extension

* Source format

* Remove nvd3 file reference from prettierignore (equivalent of nvd3.scss)

* Remove less and less-loader

* Add SCSS files to pirates require hook

GitOrigin-RevId: bd83c79f4d6ef7305d75993959a4dc5e7714ef9c
This commit is contained in:
Rebeka Dekany
2025-08-06 08:05:38 +00:00
committed by Copybot
parent dcd73f16a6
commit 3f11776ecd
303 changed files with 79 additions and 24601 deletions
@@ -214,16 +214,8 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
return staticFilesBase + webpackManifest[cssFileName]
}
res.locals.buildCssPath = function (
themeModifier = '',
bootstrapVersion = 3
) {
// Pick which main stylesheet to use based on Bootstrap version
return res.locals.buildStylesheetPath(
bootstrapVersion === 5
? 'main-style-bootstrap-5.css'
: `main-${themeModifier}style.css`
)
res.locals.buildCssPath = function () {
return res.locals.buildStylesheetPath('main-style.css')
}
res.locals.buildImgPath = function (imgFile) {
@@ -346,17 +338,14 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
{
name: 'Dark',
val: '',
path: res.locals.buildCssPath(),
},
{
name: 'Light',
val: 'light-',
path: res.locals.buildCssPath('light-'),
},
{
name: 'System',
val: 'system',
path: res.locals.buildCssPath(),
},
]
}
@@ -373,12 +362,6 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
next()
})
webRouter.use(function (req, res, next) {
res.locals.bootstrap5Override =
req.query['bootstrap-5-override'] === 'enabled'
next()
})
webRouter.use(function (req, res, next) {
res.locals.websiteRedesignOverride = req.query.redesign === 'enabled'
next()