Skip to content

Commit

Permalink
chore: font organization (#523)
Browse files Browse the repository at this point in the history
* font improvements and organization changes that allow for consuming projects to optimize fonts

* adjusting html package and vue-storybook app style imports

* fixing accessibility issue with 'hidden' slides in MixinCarousel

* minor version bump
  • Loading branch information
stephiescastle authored Jul 30, 2024
1 parent 28b9862 commit eb99ab1
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 24 deletions.
2 changes: 1 addition & 1 deletion apps/vue-storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import vClickOutside from 'click-outside-vue3'
import VueCompareImage from 'vue3-compare-image'
import { createPinia } from 'pinia'
import filters from '@explorer-1/vue/src/utils/filters'
import '@explorer-1/common/src/scss/styles.scss'
import '@explorer-1/common/src/scss/styles-with-fonts.scss'
import { withGlobals, globalTypes } from './withGlobals'
import customTheme from '@explorer-1/common-storybook/src/config/customTheme'
import '@explorer-1/common-storybook/src/config/canvas.css'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"publishConfig": {
"access": "public"
},
"version": "3.1.3",
"version": "3.2.0",
"type": "module",
"description": "Monorepo for JPL's design system, Explorer 1",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@explorer-1/common",
"version": "1.0.5",
"version": "1.1.0",
"private": false,
"publishConfig": {
"access": "public"
Expand Down
12 changes: 4 additions & 8 deletions packages/common/src/scss/_fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
font-weight: 600;
font-style: italic;
font-display: swap;
src: url('../fonts/metropolis/Metropolis-SemiBoldItalic.woff2')
format('woff2');
src: url('../fonts/metropolis/Metropolis-SemiBoldItalic.woff2') format('woff2');
}

@font-face {
Expand Down Expand Up @@ -84,24 +83,21 @@
font-weight: 700;
font-style: italic;
font-display: swap;
src: url('../fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2')
format('woff2');
src: url('../fonts/archivo-narrow/ArchivoNarrow-BoldItalic.woff2') format('woff2');
}

@font-face {
font-family: 'Archivo Narrow';
font-weight: 600;
font-style: normal;
font-display: swap;
src: url('../fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2')
format('woff2');
src: url('../fonts/archivo-narrow/ArchivoNarrow-SemiBold.woff2') format('woff2');
}

@font-face {
font-family: 'Archivo Narrow';
font-weight: 600;
font-style: italic;
font-display: swap;
src: url('../fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2')
format('woff2');
src: url('../fonts/archivo-narrow/ArchivoNarrow-SemiBoldItalic.woff2') format('woff2');
}
2 changes: 0 additions & 2 deletions packages/common/src/scss/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@use 'sass:math';
@tailwind base;
@tailwind utilities;

// Conversion util for easier definition of font sizes by pixel size
@function pxToRem($pxValue) {
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/scss/components/_MixinCarousel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
@apply overflow-visible #{!important};

.swiper-slide {
@apply opacity-50 transition-opacity duration-500 ease-in-out h-auto;
@apply opacity-50 transition-opacity duration-500 ease-in-out h-auto pointer-events-none;

&.swiper-slide-visible,
&:focus,
&:focus-within {
@apply opacity-100;
@apply opacity-100 pointer-events-auto;
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/scss/styles-with-fonts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import 'fonts';
@import 'styles.scss';
1 change: 0 additions & 1 deletion packages/common/src/scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// main elements
@import 'forms';
@import 'fonts';
@import 'aspect-ratios';
@import 'grid';
@import 'typography';
Expand Down
2 changes: 1 addition & 1 deletion packages/html/src/assets/scss/styles.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@import './../../../node_modules/@explorer-1/common/src/scss/styles';
@import '@explorer-1/common/src/scss/styles-with-fonts';
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@explorer-1/vue",
"version": "0.1.9",
"version": "0.2.0",
"private": false,
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import filters from './utils/filters'
// @ts-ignore
import vClickOutside from 'click-outside-vue3'
import VueCompareImage from 'vue3-compare-image'
import './assets/scss/styles.scss'
import './assets/scss/styles-with-fonts.scss'
import App from './App.vue'

const pinia = createPinia()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ export const ImageDetailPageData = {
}
],
keepExploringInstrument: BlockLinkTileCarouselData,
keepExploringMission: [
BlockLinkTileCarouselData[0],
BlockLinkTileCarouselData[1],
BlockLinkTileCarouselData[2]
],
keepExploringMission: BlockLinkTileCarouselData,
keepExploringTarget: BlockLinkTileCarouselData,
label: 'Image',
piaNumber: 'PIA23356',
Expand Down

0 comments on commit eb99ab1

Please sign in to comment.