Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
revisit base scss
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdmaster committed Jun 26, 2021
2 parents 57d122a + 75429ef commit 7f64e77
Show file tree
Hide file tree
Showing 5 changed files with 345 additions and 181 deletions.
21 changes: 12 additions & 9 deletions assets/monitoringItemsTableCommon.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use 'sass:math';

@use 'sass:math' as math;
$default-bdw: 3px;
$default-boxdiff: 35px;

Expand Down Expand Up @@ -93,14 +93,17 @@ $default-boxdiff: 35px;
}
}

$px: 0;
$vw: 1;
$num: calc(math.div($px, $vw * 1000));
@function px2vw($px, $vw) {
@if $vw > 0 {
@return calc(math.ceil($num * 100000vw));
@function div($a, $b) {
@if function-exists('math.div') {
@return math.div($a, $b);
}
@else {
@return #{$a / $b};
}
@return $px * 1px;
}

@function px2vw($px, $vw) {
@return if($vw > 0, div($px * 100, $vw) + if($px % $vw > 0, 100, 0), #{$px}px);
}

@mixin override($vw, $bdw, $fz, $boxdiff) {
Expand Down
18 changes: 4 additions & 14 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import { NuxtConfig } from '@nuxt/types'

// eslint-disable-next-line no-restricted-imports
Expand Down Expand Up @@ -150,27 +153,14 @@ const config: NuxtConfig = {
pageTracking: true,
enabled: true,
},
/*
* nuxt-i18n による自動リダイレクトを停止したためコメントアウト
* @todo 「Cookieがあるときのみ、その言語にリダイレクトする」を実装する場合は復活させる
* 実装しない場合は以下の記述を完全に削除する
*/
/* optionalCookies: [
{
name: 'i18n_redirected',
label: 'i18n Redirection Cookie',
description:
'For automatically switching UI languages in accordance with locale preferences in the web browser configuration.',
cookies: ['i18n_redirected']
}
], */
build: {
babel: {
presets() {
return [
[
'@nuxt/babel-preset-app',
{
useBuiltIns: 'usage',
corejs: { version: '3.14' },
},
],
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,19 @@
},
"devDependencies": {
"@babel/core": "7.14.6",
"@babel/runtime-corejs3": "7.14.7",
"@mdi/js": "5.9.55",
"@nuxt/typescript-build": "2.1.0",
"@nuxt/webpack": "2.15.7",
"@nuxtjs/eslint-config": "6.0.1",
"@nuxtjs/eslint-config-typescript": "6.0.1",
"@nuxtjs/google-analytics": "2.4.0",
"@nuxtjs/stylelint-module": "4.0.0",
"@nuxtjs/vuetify": "1.12.1",
"@types/chart.js": "2.9.31",
"@types/core-js": "2.5.4",
"@types/lodash": "4.14.170",
"@types/node": "14.17.3",
"@vue/compiler-sfc": "3.1.2",
"core-js": "3.14.0",
"danger": "10.6.4",
"eslint": "7.28.0",
Expand All @@ -84,14 +86,14 @@
"nuxt-webfontloader": "1.1.0",
"prettier": "2.3.1",
"quicktype": "15.0.260",
"regenerator-runtime": "0.13.7",
"stylelint": "13.13.1",
"stylelint-config-prettier": "8.0.2",
"stylelint-config-standard": "22.0.0",
"stylelint-scss": "3.19.0",
"ts-loader": "8.3.0",
"ts-loader": "8.0.18",
"ts-node": "10.0.0",
"typescript": "4.3.4",
"vue-axe": "2.4.4",
"vue-template-compiler": "2.6.14"
"vue-axe": "2.4.4"
}
}
2 changes: 1 addition & 1 deletion stylelint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
'function-calc-no-invalid': [
true,
{
patterns: ['math.ceil()', 'math.div()', '$num * 100000vw'],
patterns: ['/'],
},
],
},
Expand Down
Loading

0 comments on commit 7f64e77

Please sign in to comment.