Skip to content

Commit

Permalink
Use Sass modules
Browse files Browse the repository at this point in the history
  • Loading branch information
niksy committed Oct 20, 2024
1 parent 29dac89 commit 8928e29
Show file tree
Hide file tree
Showing 67 changed files with 201 additions and 85 deletions.
2 changes: 2 additions & 0 deletions demo/controllers/article/galleryInContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export default {

<style lang="scss" scoped>
@use 'trim/scss/library/all' as *;
.galleryComponent {
position: relative;
border-radius: 5px; box-sizing: border-box;
Expand Down
2 changes: 2 additions & 0 deletions demo/controllers/article/imageInContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export default {

<style lang="scss" scoped>
@use 'trim/scss/library/all' as *;
.imageComponent {
min-height: em(100); position: relative;
border-radius: 5px; overflow: hidden;
Expand Down
2 changes: 2 additions & 0 deletions demo/controllers/article/quoteInContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export default {

<style lang="scss" scoped>
@use 'trim/scss/library/all' as *;
.quoteComponent {
min-height: em(100); position: relative;
margin: 2em 0; padding-right: 6em;
Expand Down
2 changes: 2 additions & 0 deletions demo/controllers/article/tableInContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ export default {

<style lang="scss" scoped>
@use 'trim/scss/library/all' as *;
.tableComponent {
position: relative;
border-radius: 5px; box-sizing: border-box;
Expand Down
2 changes: 0 additions & 2 deletions demo/scss/_library.scss

This file was deleted.

5 changes: 4 additions & 1 deletion demo/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//--------------------------------------------------------------
// Variable overrides
//--------------------------------------------------------------
$assetBasePath: '../../src/';

@forward 'trim/scss/library/variables' with (
$assetBasePath: '../../src/' !default
);
3 changes: 1 addition & 2 deletions demo/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//--------------------------------------------------------------
// Core styles
//--------------------------------------------------------------
@import 'library';
@import '../../src/scss/bundles/main';
@use '../../src/scss/bundles/main';
3 changes: 3 additions & 0 deletions documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.81.0
* Switch to Sass modules system

## 0.80.0
* **Breaking**: Switch to Vue 3, ESM module and Vite bundler

Expand Down
2 changes: 2 additions & 0 deletions src/js/components/appSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ export default Component;

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.appSearchType1 {
width: 30em; margin: -14em 0 0 -15em; position: fixed; left: 50%; top: 50%;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/dialogModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export default Component;

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.overlay {
position: fixed; top: 0; bottom: 0; left: 0; right: 0; z-index: 3000;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/fileUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.fileUploadType1 {
overflow: hidden;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/loader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.loader-enter-active, .loader-leave-active {
transition: opacity 0.2s;
}
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/mainNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.mainNavigation {
position: absolute; left: 0; top: 0; bottom: 0; z-index: $zIndexHeader + 10;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/massActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.massActionsType1 {
> .selectCont {
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.message {
font-size: 1.4em; padding: em(20,14); position: relative;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/pagePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export default Component;

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.pagePreviewType1 {
> .controls {
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ export default Component;

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.popupType1 {
position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 1998;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.resourceControls .dropdownControls {
float: left; position: relative;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceFilters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.filtersType1 {
position: relative; background: #fff;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.headerType1 {
position: relative;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceListCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.cardListType1 {
animation: slideDownFadeIn 0.2s;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourcePagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ export default Pagination;

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.pages {
display: block; position: relative; padding: 0 3.6em; overflow: hidden;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceSort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.sortType1 {
display: inline-block; opacity: 0.5;
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/resourceToggleColumnsVisibility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.toggleColumnsVisibility {
position: relative; float: right;
Expand Down
2 changes: 2 additions & 0 deletions src/js/controllers/auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.login {
min-width: 30em;
Expand Down
2 changes: 2 additions & 0 deletions src/js/controllers/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.errorPageType1 {
display: flex; justify-content: center; flex-direction: column; min-height: 50em; min-height: calc(100vh - 50px); position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/js/dependencies/vue-date-pick/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,6 @@ function boundNumber(value, min, max) {

<style lang="scss">
@import './index.scss';
@use './index.scss' as *;
</style>
2 changes: 2 additions & 0 deletions src/js/formElements/checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.checkboxType1 {
position: absolute; left: -999em;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/code.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.codeInputType1 {
.CodeMirror {
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/color.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.colorInputType1 {
position: relative;
Expand Down
3 changes: 2 additions & 1 deletion src/js/formElements/date.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export default {
</script>

<style lang="scss">
@import '../dependencies/vue-date-pick/index.scss';
@use '../../scss/library/all' as *;
@use '../dependencies/vue-date-pick/index.scss' as *;
.vdpComponent {
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/elementWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.labelType1 {
font-size: 1.3em; display: inline-block; padding: 0 em(5,13);
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/externalAdmin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ export default Component;

<style lang="scss">
@use '../../scss/library/all' as *;
.externalAdminElement {
display: inline-block; position: relative;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/fileAttachment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.fileAttachment {
display: block; position: relative; padding: 0.5em; padding-right: 4em; overflow: hidden;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/html.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.htmlInputType1 {
@include fontSans;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/htmlComponents/componentControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export default {

<style lang="scss" scoped>
@use '../../../scss/library/all' as *;
.componentControls {
position: absolute; right: -1px; top: -1px;
background: #fff; border-radius: 0.4em;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/htmlComponents/html.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ export default {
</script>

<style lang="scss">
@use '../../../scss/library/all' as *;
.ck_add_components .cke_combo_text {
width: auto;
}
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/htmlComponents/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ export default {
</script>

<style lang="scss">
@use '../../../scss/library/all' as *;
.htmlComponentsType1 {
@include clearfix;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/includedAdmin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
@import url('dragula/dist/dragula.css');
.includedAdminElement {
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.mapElementType1 {
position: relative; padding: 0.5em; padding-bottom: percentage(divide(1,2));
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/media.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.mediaInputType1 {
display: inline-block; position: relative; padding: 0.5em; padding-right: 4em; overflow: hidden;
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/mediaPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.mediaPreviewType1 {
position: relative; padding: 0.5em;
Expand Down
4 changes: 4 additions & 0 deletions src/js/formElements/multipleSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ export default {

<style lang="scss" scoped>
@use '../../scss/library/all' as *;
.loading {
display: inline-block; padding: em(5,13) em(10,13) em(5,13) 0; font-size: 1.3em;
Expand All @@ -168,6 +170,8 @@ export default {

<style lang="scss">
@use '../../scss/library/all' as *;
.inputBlockType1, .inlineInputBlockType1 {
.multiselect--active {
Expand Down
2 changes: 2 additions & 0 deletions src/js/formElements/nestedSelect/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,8 @@ export default {

<style lang="scss">
@use '../../../scss/library/all' as *;
.nestedSelectElement {
display: inline-block; position: relative; box-sizing: border-box;
Expand Down
Loading

0 comments on commit 8928e29

Please sign in to comment.