@sb1/ffe-symbols 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,31 +19,31 @@ Approach 1 is probably what you want for performance reasons.
19
19
 
20
20
  ### Using Less
21
21
 
22
- Copy the font files from `node_modules/@sb1/ffe-symbol/icons/` to a folder that will be shipped with your app. You can use npm-scripts, (if you use Webpack) [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin), or whatever you see fit to get the files to where they need to be.
22
+ Copy the font files from `node_modules/@sb1/ffe-symbols/icons/` to a folder that will be shipped with your app. You can use npm-scripts, (if you use Webpack) [copy-webpack-plugin](https://github.com/webpack-contrib/copy-webpack-plugin), or whatever you see fit to get the files to where they need to be.
23
23
 
24
24
  Import `node_modules/@sb1/ffe-symbols/ffe-symbol.less` in your app:
25
25
 
26
26
  ```less
27
- @import 'npm://@sb1/ffe-symbol/ffe-symbol.less'; // with less-plugin
28
- @import '~@sb1/ffe-symbol/ffe-symbol.less'; // with webpack and less-loader
29
- @import '../path/to/node_modules/@sb1/ffe-symbol/ffe-symbol.less'; // by path
27
+ @import 'npm://@sb1/ffe-symbols/ffe-symbol.less'; // with less-plugin
28
+ @import '~@sb1/ffe-symbols/ffe-symbol.less'; // with webpack and less-loader
29
+ @import '../path/to/node_modules/@sb1/ffe-symbols/ffe-symbol.less'; // by path
30
30
  ```
31
31
 
32
32
  You need to provide a constant named `@icons-url` after the `@import` with a URL path to the fonts folder so the browser knows where to download the font files.
33
33
 
34
34
  ```less
35
- @import '~@sb1/ffe-symbol/ffe-symbol.less';
35
+ @import '~@sb1/ffe-symbols/ffe-symbol.less';
36
36
  @icons-url: '/privat/forsikring/icons';
37
37
  ```
38
38
 
39
39
  ### CSS with inline fonts
40
40
 
41
41
  ```css
42
- @import url('~@sb1/ffe-symbol/ffe-symbol.css');
42
+ @import url('~@sb1/ffe-symbols/ffe-symbol.css');
43
43
  ```
44
44
 
45
45
  ```less
46
- @import (inline) '~@sb1/ffe-symbol/ffe-symbol.css';
46
+ @import (inline) '~@sb1/ffe-symbols/ffe-symbol.css';
47
47
  ```
48
48
 
49
49
  ## React component
package/ffe-symbol.css CHANGED
@@ -1,11 +1,5 @@
1
1
  :root {
2
2
  --ffe-v-symbol-font: 'Material Symbols Rounded';
3
- --ffe-v-symbol-default-color: var(--ffe-farge-vann);
4
- }
5
- @media (prefers-color-scheme: dark) {
6
- :root .native {
7
- --ffe-v-symbol-default-color: var(--ffe-farge-vann-70);
8
- }
9
3
  }
10
4
  .ffe-symbol {
11
5
  font-family: var(--ffe-v-symbol-font);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-symbols",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Styling for tilpasning av material symbols til Sb1",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -19,6 +19,8 @@
19
19
  "author": "SpareBank1",
20
20
  "files": [
21
21
  "icons",
22
+ "symbol.less",
23
+ "theme.less",
22
24
  "ffe-symbol.less",
23
25
  "ffe-symbol-font-inline.less",
24
26
  "ffe-symbol.css"
@@ -31,5 +33,5 @@
31
33
  "publishConfig": {
32
34
  "access": "public"
33
35
  },
34
- "gitHead": "b9fee6160c5c4b2a731a1bc3fe480a8bdfe6e838"
36
+ "gitHead": "436c8dc02fe8d6015efa8db9cefc1e4f16a24b21"
35
37
  }
package/symbol.less ADDED
@@ -0,0 +1,37 @@
1
+ @import './theme.less';
2
+
3
+ .ffe-symbol {
4
+ font-family: var(--ffe-v-symbol-font);
5
+ font-style: normal;
6
+ display: inline-block;
7
+ line-height: 1;
8
+ text-transform: none;
9
+ letter-spacing: normal;
10
+ word-wrap: normal;
11
+ white-space: nowrap;
12
+ direction: ltr;
13
+
14
+ &--xs {
15
+ font-size: 1rem;
16
+ }
17
+
18
+ &--sm {
19
+ font-size: 1.25rem;
20
+ }
21
+
22
+ &--md {
23
+ font-size: 1.5rem;
24
+ }
25
+
26
+ &--lg {
27
+ font-size: 2rem;
28
+ }
29
+
30
+ &--xl {
31
+ font-size: 2.5rem;
32
+ }
33
+
34
+ &--2xl {
35
+ font-size: 3rem;
36
+ }
37
+ }
package/theme.less ADDED
@@ -0,0 +1,3 @@
1
+ :root {
2
+ --ffe-v-symbol-font: 'Material Symbols Rounded';
3
+ }