@defra/flood-webchat 0.0.1-alpha.5 → 0.0.1-alpha.7
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/main.scss +9 -2
- package/package.json +2 -3
- package/src/style/_mixins.scss +13 -0
package/main.scss
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
// Tools
|
|
3
|
+
@import "./src/style/mixins";
|
|
4
|
+
|
|
5
|
+
// Objects
|
|
6
|
+
@import "demo/client/buttons";
|
|
7
|
+
|
|
1
8
|
.js-enabled[data-wc-unsupported] {
|
|
2
9
|
display: none;
|
|
3
10
|
}
|
|
@@ -59,7 +66,7 @@
|
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
&:focus.wc-focus-visible::after {
|
|
62
|
-
@include focus($glow: 5px, $strong: 2px, $background: 0, $inset: 0);
|
|
69
|
+
@include wc-focus($glow: 5px, $strong: 2px, $background: 0, $inset: 0);
|
|
63
70
|
|
|
64
71
|
inset: 4px;
|
|
65
72
|
}
|
|
@@ -467,7 +474,7 @@
|
|
|
467
474
|
border-bottom: 1px solid govuk-colour('black');
|
|
468
475
|
|
|
469
476
|
&.wc-focus-visible::after {
|
|
470
|
-
@include focus($glow: 5px, $strong: 2px, $background: 0, $inset: 0);
|
|
477
|
+
@include wc-focus($glow: 5px, $strong: 2px, $background: 0, $inset: 0);
|
|
471
478
|
|
|
472
479
|
inset: 4px;
|
|
473
480
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defra/flood-webchat",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/server/index.js",
|
|
7
7
|
"browser": "src/client/index.js",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "npm run lint && npm run unit-test",
|
|
9
|
+
"test": "npm run compile-templates && npm run lint && npm run unit-test",
|
|
10
10
|
"dev": "npm run compile-templates && node -r dotenv/config node_modules/.bin/webpack server --config demo/webpack.config.mjs",
|
|
11
11
|
"unit-test": "jest",
|
|
12
12
|
"lint": "npm run lint:js && npm run lint:scss",
|
|
13
13
|
"lint:fix": "npm run lint:js -- --fix && npm run lint:scss -- --fix",
|
|
14
14
|
"lint:js": "standard",
|
|
15
15
|
"lint:scss": "stylelint \"**/*.scss\"",
|
|
16
|
-
"postinstall": "npm run compile-templates",
|
|
17
16
|
"prepare": "node -e \"try { require('husky').install() } catch (e) {if (e.code !== 'MODULE_NOT_FOUND') { throw e } }\"",
|
|
18
17
|
"compile-templates": "mkdir -p dist && nunjucks-precompile templates > ./dist/templates.js"
|
|
19
18
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@mixin wc-focus($glow: 8px, $strong: 5px, $background: 2px, $inset: 0) {
|
|
2
|
+
position:absolute;
|
|
3
|
+
content:'';
|
|
4
|
+
inset: 5px;
|
|
5
|
+
box-shadow:
|
|
6
|
+
0 0 0 $background govuk-colour('white'),
|
|
7
|
+
inset 0 0 0 $inset govuk-colour('black'),
|
|
8
|
+
0 0 0 $strong govuk-colour('black'),
|
|
9
|
+
0 0 0 $glow $govuk-focus-colour;
|
|
10
|
+
outline: 3px solid transparent;
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
z-index: 99;
|
|
13
|
+
}
|