Skip to content

Commit 45b47eb

Browse files
committed
Make focus styling more consistent. Fix weird border problems caused by SCSS compilation problems.
1 parent e97df0c commit 45b47eb

4 files changed

Lines changed: 26 additions & 8 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"prepublishOnly": "npm run build",
77
"start": "ng serve",
88
"build": "ng build && sass ./projects/tubular-ng-widgets/src/styles.scss ./dist/tubular-ng-widgets/assets/styles.css",
9+
"build:demo": "ng build ng-widgets-showcase",
910
"watch": "ng build --watch --configuration development",
1011
"test": "ng test",
1112
"lint": "eslint 'projects/**/src/**/*.ts'",

projects/tubular-ng-widgets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tubular/ng-widgets",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"peerDependencies": {
55
"@angular/common": "^12.1.3",
66
"@angular/core": "^12.1.3",

projects/tubular-ng-widgets/src/lib/digit-sequence-editor/digit-sequence-editor.directive.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
overflow: hidden;
2727
position: relative;
2828
touch-action: manipulation;
29+
user-select: none;
2930
white-space: pre;
3031
}
3132

projects/tubular-ng-widgets/src/styles.scss

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,12 @@
4747
align-items: center;
4848
background-color: #F4F4F4;
4949
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a6a6a6' fill-opacity='1' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
50-
border: #A6A6A6 solid max(1px, 0.0836em);
51-
border-radius: max(4px, 0.2em) max(4px, 0.2em) 0 0; cursor: grab;
50+
// border: solid max(1px, 0.0836em) #A6A6A6; // For some reason, SCSS compilation or minimization is losing parts of shorthand borders.
51+
border-color: #A6A6A6;
52+
border-style: solid;
53+
border-width: max(1px, 0.0836em);
54+
border-radius: max(4px, 0.2em) max(4px, 0.2em) 0 0;
55+
cursor: grab;
5256
display: flex;
5357
height: 0.9em;
5458
justify-content: flex-end;
@@ -61,7 +65,7 @@
6165

6266
.tbw-dse-closer {
6367
background-color: white;
64-
border: #A6A6A6 solid 1px;
68+
border: solid 1px #A6A6A6;
6569
cursor: pointer;
6670
display: inline-block;
6771
height: 0.6em;
@@ -79,7 +83,10 @@
7983

8084
.tbw-dse-footer {
8185
background-color: #F4F4F4;
82-
border: #A6A6A6 solid max(1px, 0.0836em);
86+
// border: solid max(1px, 0.0836em) #A6A6A6; // For some reason, SCSS compilation or minimization is losing parts of shorthand borders.
87+
border-color: #A6A6A6;
88+
border-style: solid;
89+
border-width: max(1px, 0.0836em);
8390
border-radius: 0 0 max(4px, 0.2em) max(4px, 0.2em);
8491
display: flex;
8592
font-size: max(14px, 0.6em);
@@ -92,7 +99,10 @@
9299

93100
.tbw-dse-button {
94101
align-items: center;
95-
border: #A6A6A6 solid max(1px, 0.0418em);
102+
// border: solid max(1px,0.0418em) #A6A6A6; // For some reason, SCSS compilation or minimization is losing parts of shorthand borders.
103+
border-color: #A6A6A6;
104+
border-style: solid;
105+
border-width: max(1px, 0.0418em);
96106
border-radius: max(2px, 0.1em);
97107
box-sizing: border-box;
98108
cursor: pointer;
@@ -150,7 +160,10 @@
150160

151161
.tbw-dse-wrapper {
152162
align-items: baseline;
153-
border: #A6A6A6 solid max(1px, 0.0836em);
163+
// border: solid max(1px, 0.0836em) #A6A6A6; // For some reason, SCSS compilation or minimization is losing parts of shorthand borders.
164+
border-color: #A6A6A6;
165+
border-style: solid;
166+
border-width: max(1px, 0.0836em);
154167
border-radius: max(4px, 0.2em);
155168
caret-color: transparent;
156169
cursor: default;
@@ -298,7 +311,10 @@
298311

299312
.tbw-dse-header {
300313
background-color: #333;
301-
border: #A6A6A6 solid max(1px, 0.0836em);
314+
// border: solid max(1px, 0.0836em) #A6A6A6; // For some reason, SCSS compilation or minimization is losing parts of shorthand borders.
315+
border-color: #A6A6A6;
316+
border-style: solid;
317+
border-width: max(1px, 0.0836em);
302318
}
303319

304320
.tbw-dse-closer {

0 commit comments

Comments
 (0)