Skip to content

Commit

Permalink
Enforcing linting of LESS (#9356)
Browse files Browse the repository at this point in the history
* linting some LESS

* enforce linting

* moving font binaries out of stylesheets to fonts folder.

* renaming font specimen sheet directory.
  • Loading branch information
rusackas authored Apr 2, 2020
1 parent c003189 commit c53bc4d
Show file tree
Hide file tree
Showing 58 changed files with 299 additions and 218 deletions.
2 changes: 1 addition & 1 deletion superset-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"prod": "node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --mode=production --colors --progress",
"build-dev": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=development webpack --mode=development --colors --progress",
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 NODE_ENV=production webpack --mode=production --colors --progress",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx .",
"lint": "eslint --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . && prettier --check '{src,stylesheets}/**/*.{css,less,sass,scss}'",
"lint-fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,tsx . && npm run clean-css",
"clean-css": "prettier --write '{src,stylesheets}/**/*.{css,less,sass,scss}'"
},
Expand Down
210 changes: 0 additions & 210 deletions superset-frontend/stylesheets/fonts/InterUI/specimen.less

This file was deleted.

63 changes: 63 additions & 0 deletions superset-frontend/stylesheets/less/font_specimens/fira_code.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

@font-face {
font-family: 'Fira Code';
src: url('../../../fonts/FiraCode/woff2/FiraCode-Light.woff2') format('woff2'),
url('../../../fonts/FiraCode/woff/FiraCode-Light.woff') format('woff');
font-weight: 300;
font-style: normal;
}

@font-face {
font-family: 'Fira Code';
src: url('../../../fonts/FiraCode/woff2/FiraCode-Regular.woff2')
format('woff2'),
url('../../../fonts/FiraCode/woff/FiraCode-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Fira Code';
src: url('../../../fonts/FiraCode/woff2/FiraCode-Medium.woff2')
format('woff2'),
url('../../../fonts/FiraCode/woff/FiraCode-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: 'Fira Code';
src: url('../../../fonts/FiraCode/woff2/FiraCode-Bold.woff2') format('woff2'),
url('../../../fonts/FiraCode/woff/FiraCode-Bold.woff') format('woff');
font-weight: 700;
font-style: normal;
}

@font-face {
font-family: 'Fira Code VF';
src: url('../../../fonts/FiraCode/woff2/FiraCode-VF.woff2')
format('woff2-variations'),
url('../../../fonts/FiraCode/woff/FiraCode-VF.woff')
format('woff-variations');
/* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */
font-weight: 300 700;
font-style: normal;
}
Loading

0 comments on commit c53bc4d

Please sign in to comment.