OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Change SPOT SASS structure a bit so variable and mixin-only sass is separated
Benjamin Bädorf030f77225269
diff --git a/frontend/src/app/shared/components/project-include/project-include.component.sass b/frontend/src/app/shared/components/project-include/project-include.component.sassindex 0917f60c28f..8b2f4495c3f 100644--- a/frontend/src/app/shared/components/project-include/project-include.component.sass+++ b/frontend/src/app/shared/components/project-include/project-include.component.sass@@ -1,5 +1,4 @@-@import '../../../spot/styles/sass/common/typography'-@import '../../../spot/styles/sass/common/variables'+@import '../../../spot/styles/sass/variables'\::ng-deep .spot-drop-modal--bodywidth: 460pxdiff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.htmlindex e0c53277f88..f89d8997d0b 100644--- a/frontend/src/app/spot/spot-docs.component.html+++ b/frontend/src/app/spot/spot-docs.component.html@@ -222,7 +222,19 @@ Currently selected value is {{ toggleValue }}(click)="dropModalOpen = !dropModalOpen">Open Modal</button><ng-container slot="body">- <h1>Test</h1>+ <div class="spot-body">+ <h1>Test</h1>++ <spot-text-field+ placeholder="Placeholder value"+ [(ngModel)]="textFieldValue"+ >+ <span+ slot="before"+ class="spot-icon spot-icon_bell"+ ></span>+ </spot-text-field>+ </div></ng-container></spot-drop-modal>diff --git a/frontend/src/app/spot/spot-docs.component.ts b/frontend/src/app/spot/spot-docs.component.tsindex be1a9f76d62..c75d1610979 100644--- a/frontend/src/app/spot/spot-docs.component.ts+++ b/frontend/src/app/spot/spot-docs.component.ts@@ -10,7 +10,7 @@ export class SpotDocsComponent {listCheckboxValue = null;textFieldValue = 'ngModel value';dropModalOpen = false;- alignment = 'bottom-center';+ alignment = 'bottom-left';toggleValue = null;toggleOptions = [diff --git a/frontend/src/app/spot/styles/sass/common/index.sass b/frontend/src/app/spot/styles/sass/common/index.sassindex f1210eea4df..c781279d27e 100644--- a/frontend/src/app/spot/styles/sass/common/index.sass+++ b/frontend/src/app/spot/styles/sass/common/index.sass@@ -1,5 +1,2 @@@import './icon'-@import './zindex'-@import './typography'-@import './variables'@import './body'diff --git a/frontend/src/app/spot/styles/sass/common/variables.sass b/frontend/src/app/spot/styles/sass/common/variables.sassdeleted file mode 100644index c3ef74b4f2c..00000000000--- a/frontend/src/app/spot/styles/sass/common/variables.sass+++ /dev/null@@ -1 +0,0 @@-@import '../../tokens/dist/tokens'diff --git a/frontend/src/app/spot/styles/sass/components/drop-modal.sass b/frontend/src/app/spot/styles/sass/components/drop-modal.sassindex c20390360ca..1e0e61076c7 100644--- a/frontend/src/app/spot/styles/sass/components/drop-modal.sass+++ b/frontend/src/app/spot/styles/sass/components/drop-modal.sass@@ -20,12 +20,21 @@background: $spot-color-basic-whiteborder-radius: 5px+ @media #{$spot-mq-landscape}+ bottom: $spot-spacing-1+ top: $spot-spacing-1+ right: $spot-spacing-3_5+ height: calc(100vw - (2 * #{$spot-spacing-1}))+ width: calc(100vh - (#{$spot-spacing-3_5} - #{$spot-spacing-1}))+@media #{$spot-mq-drop-modal-in-context}position: absolutetop: unsetbottom: unsetleft: unsetright: unset+ width: auto+ max-width: calc(100vw - (2 * #{$spot-spacing-1}))&_bottom-centertop: calc(100% + #{$spot-spacing-0_25})@@ -79,6 +88,15 @@transform: translateX(-50%)background-color: $spot-color-basic-white+ @media #{$spot-mq-landscape}+ bottom: unset+ left: unset+ right: $spot-spacing-0_75+ width: calc(100% - 2 * $spot-spacing-1)+ top: 50%+ transform: translateY(-50%)++&_opened &--close-buttondisplay: blockdiff --git a/frontend/src/app/spot/styles/sass/index.sass b/frontend/src/app/spot/styles/sass/index.sassindex 30393d2e967..390f320700a 100644--- a/frontend/src/app/spot/styles/sass/index.sass+++ b/frontend/src/app/spot/styles/sass/index.sass@@ -1,2 +1,3 @@+@import 'variables'@import 'common'@import 'components'diff --git a/frontend/src/app/spot/styles/sass/variables/index.sass b/frontend/src/app/spot/styles/sass/variables/index.sassnew file mode 100644index 00000000000..03211e88368--- /dev/null+++ b/frontend/src/app/spot/styles/sass/variables/index.sass@@ -0,0 +1,3 @@+@import '../../tokens/dist/tokens'+@import 'typography'+@import 'zindex'diff --git a/frontend/src/app/spot/styles/sass/common/typography.sass b/frontend/src/app/spot/styles/sass/variables/typography.sasssimilarity index 100%rename from frontend/src/app/spot/styles/sass/common/typography.sassrename to frontend/src/app/spot/styles/sass/variables/typography.sassdiff --git a/frontend/src/app/spot/styles/sass/common/zindex.sass b/frontend/src/app/spot/styles/sass/variables/zindex.sasssimilarity index 68%rename from frontend/src/app/spot/styles/sass/common/zindex.sassrename to frontend/src/app/spot/styles/sass/variables/zindex.sassindex b891ac6bba4..b9bffc5c7b9 100644--- a/frontend/src/app/spot/styles/sass/common/zindex.sass+++ b/frontend/src/app/spot/styles/sass/variables/zindex.sass@@ -1,6 +1,6 @@@use "sass:map"-$spot-z-indexes: ( "drop-modal": 1000 )+$spot-z-indexes: ( "header": 20, "drop-modal": 1000)@mixin spot-z-index($type, $addition: 0)z-index: map.get($spot-z-indexes, $type) + $additiondiff --git a/frontend/src/app/spot/styles/tokens/dist/tokens.json b/frontend/src/app/spot/styles/tokens/dist/tokens.jsonindex d86471efef2..470f32b13c9 100644--- a/frontend/src/app/spot/styles/tokens/dist/tokens.json+++ b/frontend/src/app/spot/styles/tokens/dist/tokens.json@@ -54,7 +54,7 @@"spot-shadow-hard-low": "2px 2px 5px rgba(0, 0, 0, 0.25)","spot-shadow-hard-mid": "4px 4px 10px rgba(0, 0, 0, 0.25)","spot-shadow-hard-high": "6px 6px 20px rgba(0, 0, 0, 0.25)",- "spot-mq-drop-modal-in-context": "'screen and (min-width: 768px)'",- "spot-mq-portrait": "'screen and (orientation: portrait)'",- "spot-mq-landscape": "'screen and (orientation: landscape)'"+ "spot-mq-portrait": "'(orientation: portrait)'",+ "spot-mq-landscape": "'(orientation: landscape)'",+ "spot-mq-drop-modal-in-context": "'(min-width: 680px) and (min-height: 500px)'"}\ No newline at end of filediff --git a/frontend/src/app/spot/styles/tokens/dist/tokens.sass b/frontend/src/app/spot/styles/tokens/dist/tokens.sassindex 8becbeb3549..7196dd84ca7 100644--- a/frontend/src/app/spot/styles/tokens/dist/tokens.sass+++ b/frontend/src/app/spot/styles/tokens/dist/tokens.sass@@ -54,6 +54,6 @@ $spot-shadow-light-high: 6px 6px 20px rgba(0, 0, 0, 0.15)$spot-shadow-hard-low: 2px 2px 5px rgba(0, 0, 0, 0.25)$spot-shadow-hard-mid: 4px 4px 10px rgba(0, 0, 0, 0.25)$spot-shadow-hard-high: 6px 6px 20px rgba(0, 0, 0, 0.25)-$spot-mq-drop-modal-in-context: 'screen and (min-width: 768px)'-$spot-mq-portrait: 'screen and (orientation: portrait)'-$spot-mq-landscape: 'screen and (orientation: landscape)'+$spot-mq-portrait: '(orientation: portrait)'+$spot-mq-landscape: '(orientation: landscape)'+$spot-mq-drop-modal-in-context: '(min-width: 680px) and (min-height: 500px)'diff --git a/frontend/src/app/spot/styles/tokens/media-queries.yml b/frontend/src/app/spot/styles/tokens/media-queries.ymlindex 140ec772289..8ad4d717aa5 100644--- a/frontend/src/app/spot/styles/tokens/media-queries.yml+++ b/frontend/src/app/spot/styles/tokens/media-queries.yml@@ -1,11 +1,9 @@props:- spot-mq-portrait:- value: "'screen and (orientation: portrait)'"spot-mq-landscape:- value: "'screen and (orientation: landscape)'"+ value: "'(orientation: landscape)'"spot-mq-drop-modal-in-context:- value: "'screen and (min-width: 680px)'"+ value: "'(min-width: 680px) and (min-height: 500px)'"global:type: media-querydiff --git a/frontend/src/global_styles/common/header/app-header.sass b/frontend/src/global_styles/common/header/app-header.sassindex 5bfedaf9707..27c2110b92e 100644--- a/frontend/src/global_styles/common/header/app-header.sass+++ b/frontend/src/global_styles/common/header/app-header.sass@@ -7,7 +7,7 @@height: var(--header-height)padding: 0position: relative- z-index: 22+ @include spot-z-index("header")border-bottom-style: solidborder-bottom-width: var(--header-border-bottom-width)border-bottom-color: var(--header-border-bottom-color)diff --git a/frontend/src/global_styles/layout/_base.sass b/frontend/src/global_styles/layout/_base.sassindex e93b1ed420e..fd16b3a46c7 100644--- a/frontend/src/global_styles/layout/_base.sass+++ b/frontend/src/global_styles/layout/_base.sass@@ -35,7 +35,6 @@#maindisplay: gridgrid-template-columns: auto 1fr- z-index: 20overflow: auto&.nomenusdiff --git a/frontend/src/global_styles/openproject.sass b/frontend/src/global_styles/openproject.sassindex bdd45413129..8305e166b8d 100644--- a/frontend/src/global_styles/openproject.sass+++ b/frontend/src/global_styles/openproject.sass@@ -1,3 +1,6 @@+// SPOT variables+@import "../app/spot/styles/sass/variables"+@import "fonts/_index.sass"@import "openproject/_index.sass"@import "vendor/_index.sass"@@ -5,8 +8,11 @@@import "content/_index.sass"@import "./common/openproject-common.module"-@import "../app/spot/styles/sass"@import "../app/shared/components/modal/modal.module"// Dynamically linked plugin styles from Rails plugins@import "../app/features/plugins/linked-plugins.styles"++// SPOT styles+@import "../app/spot/styles/sass/common"+@import "../app/spot/styles/sass/components"