From fa8675bfd72eb07f1dff0e0a0db376ab4df64676 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Thu, 18 Apr 2024 15:32:29 +0200 Subject: [PATCH] Remove unused image-url mixin. Remove rarely used tags from reset. --- assets/sass/_init.scss | 1 - assets/sass/_reset.scss | 26 ---------- .../highlight-mark/_highlight-mark.scss | 11 ---- assets/sass/mixins/image-url/_image-url.scss | 50 ------------------- assets/sass/styles.scss | 1 - 5 files changed, 89 deletions(-) delete mode 100644 assets/sass/components/highlight-mark/_highlight-mark.scss delete mode 100644 assets/sass/mixins/image-url/_image-url.scss diff --git a/assets/sass/_init.scss b/assets/sass/_init.scss index ca3f33d..aa29fb8 100644 --- a/assets/sass/_init.scss +++ b/assets/sass/_init.scss @@ -15,6 +15,5 @@ @import 'mixins/clearfix/clearfix'; @import 'mixins/debug/debug'; @import 'mixins/flex-calc/flex-calc'; -@import 'mixins/image-url/image-url'; @import 'mixins/rtl/rtl'; @import 'mixins/spacing/spacing'; diff --git a/assets/sass/_reset.scss b/assets/sass/_reset.scss index 9632297..aa638d7 100644 --- a/assets/sass/_reset.scss +++ b/assets/sass/_reset.scss @@ -85,29 +85,3 @@ kbd, samp { font-family: var(--ff-monospace); } - -// Mark text - -mark { - @extend %highlight-mark; -} - -// Superscript / Subscript - -sub, -sup { - // Prevent `sub` and `sup` elements from affecting the line height in - // all browsers. - font-size: var(--fs-xs); - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -.25em; -} - -sup { - top: -.5em; -} diff --git a/assets/sass/components/highlight-mark/_highlight-mark.scss b/assets/sass/components/highlight-mark/_highlight-mark.scss deleted file mode 100644 index eceaa5a..0000000 --- a/assets/sass/components/highlight-mark/_highlight-mark.scss +++ /dev/null @@ -1,11 +0,0 @@ -// Highlight mark -// -// The "new" or "updated" marker. This is a very thin component. A front-end -// developer may choose to delete this component and just style the `` -// element directly. - -.highlight-mark, -%highlight-mark { - color: var(--color-mark-highlight); - background-color: var(--color-mark-bg); -} diff --git a/assets/sass/mixins/image-url/_image-url.scss b/assets/sass/mixins/image-url/_image-url.scss deleted file mode 100644 index d47e906..0000000 --- a/assets/sass/mixins/image-url/_image-url.scss +++ /dev/null @@ -1,50 +0,0 @@ -// stylelint-disable function-url-quotes - -// The relative path from the css directory to the sass directory. -$image-url-path-to-source: '../sass' !default; -// The relative path from the root sass directory to where your components usually lie. -$image-url-subdirectory: 'components' !default; - -// image-url() -// -// If you include your images next to your component Sass files, you need to -// specify a url() to point from the generated CSS to the Sass source like this: -// -// ```css -// content: url(../sass/components/is-quite/long.svg); -// ``` -// -// With the `image-url()` function the path to all your components is assumed to -// start with `../sass/components/` and you just need to give it the last, short -// bit of the path in your Sass code like this: -// -// ```scss -// content: image-url(is-quite/short.svg); -// ``` -// -// If you want to point at an image that is not in the components sub-directory -// of your sass directory, you can override the default $subdirectory by -// passing it in as the first parameter of `image-url()` like this: -// -// ```scss -// content: image-url(base, grouping/blockquote.svg); -// ``` -// -// which would output `url(../sass/base/grouping/blockquote.svg)`. -// -// $subdirectory = $image-url-subdirectory - Optional. The relative path from -// the root of your Sass source to the sub-directory where -// components usually lie. -// $path - Required. The path to the image relative to the -// `$subdirectory`. -// $path-to-source = $image-url-path-to-source - Optional. The relative path -// from the css build directory to the sass source directory. -@function image-url($subdirectory, $path: null, $path-to-source: $image-url-path-to-source) { - // If only 1 parameter is given, its value is intended for the $path. - @if type-of($path) == 'null' { - $path: $subdirectory; - $subdirectory: $image-url-subdirectory; - } - - @return url(unquote($path-to-source + '/' + $subdirectory + '/' + $path)); -} diff --git a/assets/sass/styles.scss b/assets/sass/styles.scss index 2bbce84..5a88367 100644 --- a/assets/sass/styles.scss +++ b/assets/sass/styles.scss @@ -46,7 +46,6 @@ @import 'components/grid-stack/grid-stack'; @import 'components/header/header'; @import 'components/hidden/hidden'; -@import 'components/highlight-mark/highlight-mark'; @import 'components/icon-inline/icon-inline'; @import 'components/language-selector/language-selector'; @import 'components/list-straight-left/list-straight-left';