Restructure SCSS files

This commit is contained in:
Jeremy Stretch 2024-01-05 10:10:44 -05:00
parent fc24534467
commit fc8cee34be
20 changed files with 1113 additions and 1199 deletions

View File

@ -73,8 +73,8 @@ async function bundleScripts() {
async function bundleStyles() { async function bundleStyles() {
try { try {
const entryPoints = { const entryPoints = {
'netbox-external': 'styles/_external.scss', 'netbox-external': 'styles/external.scss',
'netbox': 'styles/_netbox.scss', 'netbox': 'styles/netbox.scss',
rack_elevation: 'styles/svg/rack_elevation.scss', rack_elevation: 'styles/svg/rack_elevation.scss',
cable_trace: 'styles/svg/cable_trace.scss', cable_trace: 'styles/svg/cable_trace.scss',
graphiql: 'netbox-graphiql/graphiql.scss', graphiql: 'netbox-graphiql/graphiql.scss',

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
// Entry for all 3rd party library imports that do not rely on Bootstrap or NetBox styles.
@import '../node_modules/@mdi/font/css/materialdesignicons.min.css';
@import '../node_modules/flatpickr/dist/flatpickr.css';
@import 'gridstack/dist/gridstack.min.css';

View File

@ -1,14 +0,0 @@
@import 'variables';
// Tabler
@import '../node_modules/@tabler/core/src/scss/_core.scss';
// slim-select
@import './select.scss';
// Transitional styling
@import './transitional/cards.scss';
@import './transitional/tables.scss';
// Temporary overrides
@import './temp.scss';

View File

@ -1,4 +1,8 @@
// NetBox CSS Variables // Global variables
// Set base fonts
$font-google: 'Inter';
$font-google-monospaced: 'Roboto Mono';
// Set the navigation sidebar width // Set the navigation sidebar width
$sidebar-width: 18rem; $sidebar-width: 18rem;
@ -10,6 +14,3 @@ $btn-padding-y: 0.25rem;
// Reduce the default table cell padding // Reduce the default table cell padding
$table-cell-padding-x: 0.5rem; $table-cell-padding-x: 0.5rem;
$table-cell-padding-y: 0.5rem; $table-cell-padding-y: 0.5rem;
$font-google: 'Inter';
$font-google-monospaced: 'Roboto Mono';

View File

@ -1,40 +0,0 @@
// Import the rest of bootstrap.
@import '../node_modules/bootstrap/scss/maps';
@import '../node_modules/bootstrap/scss/mixins';
@import '../node_modules/bootstrap/scss/utilities';
@import './extensions';
@import '../node_modules/bootstrap/scss/mixins';
@import '../node_modules/bootstrap/scss/root';
@import '../node_modules/bootstrap/scss/reboot';
@import '../node_modules/bootstrap/scss/type';
@import '../node_modules/bootstrap/scss/images';
@import '../node_modules/bootstrap/scss/containers';
@import '../node_modules/bootstrap/scss/grid';
@import '../node_modules/bootstrap/scss/tables';
@import '../node_modules/bootstrap/scss/forms';
@import '../node_modules/bootstrap/scss/buttons';
@import '../node_modules/bootstrap/scss/transitions';
@import '../node_modules/bootstrap/scss/dropdown';
@import '../node_modules/bootstrap/scss/button-group';
@import '../node_modules/bootstrap/scss/nav';
@import '../node_modules/bootstrap/scss/navbar';
@import '../node_modules/bootstrap/scss/card';
@import '../node_modules/bootstrap/scss/accordion';
@import '../node_modules/bootstrap/scss/breadcrumb';
@import '../node_modules/bootstrap/scss/pagination';
@import '../node_modules/bootstrap/scss/badge';
@import '../node_modules/bootstrap/scss/alert';
@import '../node_modules/bootstrap/scss/progress';
@import '../node_modules/bootstrap/scss/list-group';
@import '../node_modules/bootstrap/scss/close';
@import '../node_modules/bootstrap/scss/toasts';
@import '../node_modules/bootstrap/scss/modal';
@import '../node_modules/bootstrap/scss/tooltip';
@import '../node_modules/bootstrap/scss/popover';
@import '../node_modules/bootstrap/scss/carousel';
@import '../node_modules/bootstrap/scss/spinners';
@import '../node_modules/bootstrap/scss/offcanvas';
@import '../node_modules/bootstrap/scss/placeholders';
@import '../node_modules/bootstrap/scss/spinners';
@import '../node_modules/bootstrap/scss/helpers';
@import '../node_modules/bootstrap/scss/utilities/api';

View File

@ -1,45 +0,0 @@
// Bootstrap utility extensions.
// See https://getbootstrap.com/docs/5.0/utilities/api/
// Add responsive max-width classes for more granular controls over max-width.
$max-width-extension: (
'max-width': (
property: max-width,
class: mw,
responsive: true,
values: (
20: 20%,
25: 25%,
33: 33%,
50: 50%,
66: 66%,
75: 75%,
80: 80%,
90: 90%,
100: 100%,
),
),
);
// Add more opacity classes.
$opacity-extension: (
'opacity': (
property: opacity,
class: opacity,
values: (
0: 0,
10: 0.1,
20: 0.2,
25: 0.25,
33: 0.33,
50: 0.5,
66: 0.66,
75: 0.75,
80: 0.8,
90: 0.9,
100: 1,
),
),
);
$utilities: map-merge($utilities, $max-width-extension, $opacity-extension);

View File

@ -0,0 +1,4 @@
// Entry for all 3rd party library imports that do not rely on Tabler or NetBox styles.
@import '../node_modules/@mdi/font/css/materialdesignicons.min.css';
@import '../node_modules/flatpickr/dist/flatpickr.min.css';
@import 'gridstack/dist/gridstack.min.css';

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
// Base NetBox Theme Overrides and Settings - color mode agnostic. // Base NetBox Theme Overrides and Settings - color mode agnostic.
@import '../node_modules/bootstrap/scss/functions'; @import '../../node_modules/bootstrap/scss/functions';
$card-cap-bg: 'unset'; $card-cap-bg: 'unset';
@ -31,8 +31,8 @@ $line-height-lg: 1.75;
$darker: #1b1f22; $darker: #1b1f22;
$darkest: #171b1d; $darkest: #171b1d;
@import '../node_modules/bootstrap/scss/variables'; @import '../../node_modules/bootstrap/scss/variables';
@import '../node_modules/bootstrap/scss/variables-dark'; @import '../../node_modules/bootstrap/scss/variables-dark';
// This is the same value as the default from Bootstrap, but it needs to be in scope prior to // This is the same value as the default from Bootstrap, but it needs to be in scope prior to
// importing _variables.scss from Bootstrap. // importing _variables.scss from Bootstrap.

View File

@ -184,3 +184,14 @@ $spacing-s: $input-padding-x;
} }
} }
} }
// Fix slim-select 1.x placeholder styling
.ss-main {
.ss-single-selected {
.placeholder {
cursor: pointer;
opacity: 1;
background-color: transparent !important;
}
}
}

View File

@ -1,4 +1,4 @@
@import '../theme-light.scss'; @import '../old/theme-light';
// Cable Trace Styles. // Cable Trace Styles.

View File

@ -1,4 +1,4 @@
@import '../theme-light.scss'; @import '../old/theme-light';
// Rack Elevation Styles. // Rack Elevation Styles.

View File

@ -1,10 +0,0 @@
// Fix slim-select 1.x placeholder styling
.ss-main {
.ss-single-selected {
.placeholder {
cursor: pointer;
opacity: 1;
background-color: transparent !important;
}
}
}