From ad385490bc249da6f634a8add1de33f897dc9966 Mon Sep 17 00:00:00 2001
From: Alina Beck
Date: Mon, 17 Feb 2020 10:44:52 +0100
Subject: [PATCH] follow @mattwr18 PR review - replace magic numbers with
tokens - remove unused name attribute - use slot shorthand (for the slots
added in this PR)
---
webapp/assets/_new/styles/tokens.scss | 21 ++++++++++++-
webapp/components/CommentCard/CommentCard.vue | 2 +-
.../ContributionForm/ContributionForm.vue | 4 +--
webapp/components/Editor/SuggestionList.vue | 2 +-
webapp/components/FilterMenu/FilterMenu.vue | 1 -
webapp/components/LoginForm/LoginForm.vue | 4 +--
.../components/Notification/Notification.vue | 2 +-
webapp/components/PostTeaser/PostTeaser.vue | 6 ++--
webapp/components/TeaserImage/TeaserImage.vue | 30 +++++++++----------
.../components/UserTeaser/UserTeaser.story.js | 2 +-
.../_new/generic/BaseCard/BaseCard.story.js | 8 ++---
.../_new/generic/BaseCard/BaseCard.vue | 2 +-
webapp/pages/password-reset.vue | 4 +--
webapp/pages/post/_id/_slug/index.vue | 6 ++--
webapp/pages/registration.vue | 4 +--
15 files changed, 58 insertions(+), 40 deletions(-)
diff --git a/webapp/assets/_new/styles/tokens.scss b/webapp/assets/_new/styles/tokens.scss
index f56d75485..4ab30177b 100644
--- a/webapp/assets/_new/styles/tokens.scss
+++ b/webapp/assets/_new/styles/tokens.scss
@@ -211,7 +211,8 @@ $letter-spacing-x-small: -0.015em;
* @presenter Opacity
*/
-$opacity-soft: 0.65;
+$opacity-base: 1;
+$opacity-soft: 0.7;
$opacity-disabled: 0.5;
/**
@@ -264,12 +265,23 @@ $size-avatar-large: 114px;
$size-button-base: 36px;
$size-button-small: 26px;
+/**
+ * @tokens Size Images
+ * @presenter Spacing
+ */
+
+$size-image-max-height: 2000px;
+$size-image-cropper-max-height: 600px;
+$size-image-cropper-min-height: 400px;
+$size-image-uploader-min-height: 200px;
+
/**
* @tokens Size Icons
* @presenter Spacing
*/
$size-icon-base: 16px;
+ $size-icon-large: 60px;
/**
* @tokens Shadow
@@ -285,6 +297,12 @@ $box-shadow-active: 0 0 6px 1px rgba(20, 100, 160, 0.5);
$box-shadow-inset: inset 0 0 20px 1px rgba(0,0,0,.15);
$box-shadow-small-inset: inset 0 0 0 1px rgba(0,0,0,.05);
+/**
+ * @tokens Effects
+ */
+
+$blur-radius: 22px;
+
/**
* @tokens Animation Duration
*/
@@ -317,6 +335,7 @@ $z-index-page-header: 2000;
$z-index-page-sidebar: 1500;
$z-index-sticky: 100;
$z-index-post-teaser-link: 5;
+$z-index-surface: 1;
/**
* @tokens Media Query
diff --git a/webapp/components/CommentCard/CommentCard.vue b/webapp/components/CommentCard/CommentCard.vue
index 573d1417b..d805d26ee 100644
--- a/webapp/components/CommentCard/CommentCard.vue
+++ b/webapp/components/CommentCard/CommentCard.vue
@@ -8,7 +8,7 @@
-
+
diff --git a/webapp/components/Notification/Notification.vue b/webapp/components/Notification/Notification.vue
index 346a14b4a..acb83b028 100644
--- a/webapp/components/Notification/Notification.vue
+++ b/webapp/components/Notification/Notification.vue
@@ -64,7 +64,7 @@ export default {
}
&.--read {
- opacity: 0.5;
+ opacity: $opacity-disabled;
}
> .description {
diff --git a/webapp/components/PostTeaser/PostTeaser.vue b/webapp/components/PostTeaser/PostTeaser.vue
index a680588a3..ace3850f4 100644
--- a/webapp/components/PostTeaser/PostTeaser.vue
+++ b/webapp/components/PostTeaser/PostTeaser.vue
@@ -11,7 +11,7 @@
}"
:highlight="isPinned"
>
-
+
@@ -158,7 +158,7 @@ export default {
height: 100%;
&.--blur-image > .hero-image > .image {
- filter: blur(22px);
+ filter: blur($blur-radius);
}
> .content {
@@ -178,7 +178,7 @@ export default {
> .counter-icon {
display: block;
margin-right: $space-small;
- opacity: 0.5;
+ opacity: $opacity-disabled;
}
> .content-menu {
diff --git a/webapp/components/TeaserImage/TeaserImage.vue b/webapp/components/TeaserImage/TeaserImage.vue
index d5d07cfc1..f1d1e7128 100644
--- a/webapp/components/TeaserImage/TeaserImage.vue
+++ b/webapp/components/TeaserImage/TeaserImage.vue
@@ -105,7 +105,7 @@ export default {