Skip to content

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

Copy still used utilities from Foundation to core and remove the rest

Henriette Darge68f2fce8f8cd
diff --git a/frontend/src/global_styles/content/_hidden.sass b/frontend/src/global_styles/content/_hidden.sass
index 9c7c57b8611..dded5522ee5 100644
--- a/frontend/src/global_styles/content/_hidden.sass
+++ b/frontend/src/global_styles/content/_hidden.sass
@@ -39,3 +39,7 @@
// Global -hidden class
.-hidden
display: none
+
+/// Taken from Foundation for Apps
+.hide
+ display: none !important
diff --git a/frontend/src/global_styles/content/work_packages/tabs/_relations.sass b/frontend/src/global_styles/content/work_packages/tabs/_relations.sass
index 83f2ce73766..27b6ce48eca 100644
--- a/frontend/src/global_styles/content/work_packages/tabs/_relations.sass
+++ b/frontend/src/global_styles/content/work_packages/tabs/_relations.sass
@@ -145,6 +145,8 @@
.wp-relations-create--form
display: flex
+ align-items: center
+ justify-content: space-between
.wp-relations-input-section
margin-right: 10px
diff --git a/frontend/src/global_styles/openproject/_generic.sass b/frontend/src/global_styles/openproject/_generic.sass
index 1dcbab9dc72..5515c3bc352 100644
--- a/frontend/src/global_styles/openproject/_generic.sass
+++ b/frontend/src/global_styles/openproject/_generic.sass
@@ -35,6 +35,10 @@
.-no-border
border: none !important
+/// Taken from Foundation for Apps
+.clearfix
+ @include clearfix
+
// Disable user selection
.-no-text-select
user-select: none
diff --git a/frontend/src/global_styles/openproject/_mixins.sass b/frontend/src/global_styles/openproject/_mixins.sass
index 1ed4f6aa34a..2cbe5db3f06 100644
--- a/frontend/src/global_styles/openproject/_mixins.sass
+++ b/frontend/src/global_styles/openproject/_mixins.sass
@@ -35,6 +35,7 @@
font-size: $font-size
font-weight: $font-weight
+/// Taken from Foundation for Apps
@mixin animation($animation, $duration: 500ms, $timing: ease, $delay: 0, $iterations: null)
animation-name: $animation
animation-duration: $duration
@@ -291,3 +292,15 @@ $scrollbar-size: 10px
&:focus
right: 0
+
+/// Taken from Foundation for Apps
+/// Clearfix
+/// Uses the micro clearfix hack popularized by Nicolas Gallagher. Include this mixin on a container if its children are all floated, to give the container a proper height.
+///
+/// @see http://nicolasgallagher.com/micro-clearfix-hack/
+@mixin clearfix
+ &:before, &:after
+ content: " "
+ display: table
+ &:after
+ clear: both
diff --git a/frontend/src/global_styles/vendor/foundation-apps/scss/components/_utilities.scss b/frontend/src/global_styles/vendor/foundation-apps/scss/components/_utilities.scss
deleted file mode 100755
index 145a098fa8f..00000000000
--- a/frontend/src/global_styles/vendor/foundation-apps/scss/components/_utilities.scss
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- UTILITIES
- ---------
-
- Responsive helper classes to assist you in quickly doing basic formatting and layout.
-
- Features:
- - Vertical alignment
- - Visibility
- - Text alignment
- - Floating
-*/
-
-$block-selector: '[class*="grid-block"]';
-
-@mixin show-for($size, $prop: block) {
- &:not(.ng-hide) {
- display: none !important;
- @include breakpoint($size) {
- display: $prop !important;
- }
- }
-}
-
-@mixin show-for-only($size, $prop: block) {
- &:not(.ng-hide) {
- display: none !important;
- @include breakpoint($size only) {
- display: $prop !important;
- }
- }
-}
-
-@mixin hide-for($size, $prop: block) {
- &:not(.ng-hide) {
- display: $prop !important;
- @include breakpoint($size) {
- display: none !important;
- }
- }
-}
-
-@mixin hide-for-only($size, $prop: block) {
- &:not(.ng-hide) {
- display: $prop !important;
- @include breakpoint($size only) {
- display: none !important;
- }
- }
-}
-
-@include exports(utilities) {
- // Vertical alignment
- .v-align {
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- $align-values: (
- 'top': flex-start,
- 'center': center,
- 'bottom': flex-end,
- );
-
- @each $orient in (top, center, bottom) {
- .align-#{$orient} {
- align-self: map-get($align-values, $orient);
- }
- }
-
- @each $size in $breakpoint-classes {
- @each $orient in (top, center, bottom) {
- @include breakpoint($size) {
- .#{$size}-align-#{$orient} {
- align-self: map-get($align-values, $orient);
- }
- }
- }
- }
- }
-
- // Visibility
- .hide { display: none !important; }
-
- .invisible { visibility: hidden; }
-
- @each $size in $breakpoint-classes {
- .hide-for-#{$size} {
- @include hide-for($size);
- &#{$block-selector} { @include hide-for($size, flex); }
- }
-
- .show-for-#{$size} {
- @include show-for($size);
- &#{$block-selector} { @include show-for($size, flex); }
- }
-
- .hide-for-#{$size}-only {
- @include hide-for-only($size);
- &#{$block-selector} { @include hide-for-only($size, flex); }
- }
-
- .show-for-#{$size}-only {
- @include show-for-only($size);
- &#{$block-selector} { @include show-for-only($size, flex); }
- }
- }
-
- @each $orientation in (portrait, landscape) {
- .hide-for-#{$orientation} {
- @include breakpoint($orientation) {
- display: none !important;
- &#{$block-selector} { display: flex !important; }
- }
- }
-
- .show-for-#{$orientation} {
- display: none !important;
-
- @include breakpoint($orientation) {
- display: block !important;
- &#{$block-selector} { display: flex !important; }
- }
- }
- }
-
- /*
- Text alignment
- */
- @each $align in (left, right, center, justify) {
- .text-#{$align} {
- text-align: $align;
- }
-
- @each $size in $breakpoint-classes {
- @include breakpoint($size) {
- .#{$size}-text-#{$align} {
- text-align: $align;
- }
- }
-
- @include breakpoint($size only) {
- .#{$size}-only-text-#{$align} {
- text-align: $align;
- }
- }
- }
- }
-
- /*
- Floating
- */
- .clearfix { @include clearfix; }
-
- @each $float in (left, right, none) {
- .float-#{$float} {
- float: #{$float};
- }
- }
-}
diff --git a/frontend/src/global_styles/vendor/foundation-apps/scss/foundation.scss b/frontend/src/global_styles/vendor/foundation-apps/scss/foundation.scss
index 9c03447d636..beee3b574be 100755
--- a/frontend/src/global_styles/vendor/foundation-apps/scss/foundation.scss
+++ b/frontend/src/global_styles/vendor/foundation-apps/scss/foundation.scss
@@ -24,5 +24,4 @@ $foundation-version: '1.1.0';
@import "components/button",
"components/forms",
"components/grid",
-"components/typography",
-"components/utilities";
+"components/typography";
diff --git a/frontend/src/global_styles/vendor/foundation-apps/scss/helpers/_mixins.scss b/frontend/src/global_styles/vendor/foundation-apps/scss/helpers/_mixins.scss
index d016288e9d6..ad0ed797376 100644
--- a/frontend/src/global_styles/vendor/foundation-apps/scss/helpers/_mixins.scss
+++ b/frontend/src/global_styles/vendor/foundation-apps/scss/helpers/_mixins.scss
@@ -89,15 +89,6 @@
}
}
-/// Clearfix
-/// Uses the micro clearfix hack popularized by Nicolas Gallagher. Include this mixin on a container if its children are all floated, to give the container a proper height.
-///
-/// @see http://nicolasgallagher.com/micro-clearfix-hack/
-@mixin clearfix {
- &:before, &:after { content: " "; display: table; }
- &:after { clear: both; }
-}
-
/// Invisible Element
/// Makes an element visually hidden, but accessible.
///