Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡ perf: provide a basic css file without the utilities to reduce the css bundle size #1503

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tough-squids-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@baloise/ds-core': minor
---

**styles**: provide a basic.css file without the utilities css classes to keep the css bundle small to improve performance
8 changes: 8 additions & 0 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,10 @@ export namespace Components {
"showSocialMedia": boolean;
}
interface BalForm {
/**
* The css class for the inner form element
*/
"formClass": string;
/**
* If `true` a native form element is added as a wrapper of the slot.
*/
Expand Down Expand Up @@ -6478,6 +6482,10 @@ declare namespace LocalJSX {
"showSocialMedia"?: boolean;
}
interface BalForm {
/**
* The css class for the inner form element
*/
"formClass"?: string;
/**
* If `true` a native form element is added as a wrapper of the slot.
*/
Expand Down
10 changes: 10 additions & 0 deletions packages/core/stencil.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ export const config: Config = {
dest: 'assets/baloise-design-system.css',
warn: true,
},
{
src: join(packagesDir, 'styles', 'css', 'basic.min.css'),
dest: 'assets/basic.min.css',
warn: true,
},
{
src: join(packagesDir, 'maps', 'dist', 'index.esm.js'),
dest: 'assets/maps.js',
Expand All @@ -126,6 +131,11 @@ export const config: Config = {
dest: 'assets/fonts',
warn: true,
},
{
src: join(packagesDir, 'brand-icons', 'src', 'assets'),
dest: 'assets/images/brand-icons',
warn: true,
},
],
},
/**
Expand Down
7 changes: 7 additions & 0 deletions packages/css/sass/basic.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "./mixins"

// Resets CSS and defines custom font
@import "./global.bundle"

// Core CSS, always required
@import "./core"
5 changes: 5 additions & 0 deletions packages/styles/sass/basic.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import './mixins'
@import './normalize'
@import './structure'
@import './font'
@import './core'