Skip to content

Commit 55c191e

Browse files
authored
Merge pull request DSpace#2587 from Dawnkai/main
Deque Analysis Color Contrast fixes
2 parents c55d518 + c20b0a7 commit 55c191e

7 files changed

Lines changed: 181 additions & 39 deletions

File tree

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
.close:focus {
2-
outline: none !important;
1+
.close {
2+
opacity: 0.75;
3+
&:focus {
4+
outline: none !important;
5+
}
6+
}
7+
button.close {
8+
opacity: 0.6;
39
}

src/app/shared/notifications/notification/notification.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
}
66

77
.close {
8-
outline: none !important
8+
outline: none !important;
9+
opacity: 0.8;
910
}
1011

1112
.notification-icon {

src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,10 @@
3737
margin: 0 calc(-1 * (var(--ds-slider-handle-width) / 2));
3838
width: calc(100% + var(--ds-slider-handle-width));
3939
}
40+
.noUi-handle {
41+
border-color: var(--ds-slider-handle-color);
42+
&::before, &::after {
43+
background-color: var(--ds-slider-handle-color);
44+
}
45+
}
4046
}

src/styles/_bootstrap_variables.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ $green: #94BA65 !default;
3434
$cyan: #006666 !default;
3535
$yellow: #ec9433 !default;
3636
$red: #CF4444 !default;
37+
$teal: #1F7293 !default;
3738
$dark: darken($blue, 17%) !default;
3839

39-
40-
4140
$theme-colors: (
4241
primary: $blue,
4342
secondary: $gray-700,
@@ -49,7 +48,7 @@ $theme-colors: (
4948
dark: $dark
5049
) !default;
5150
/* Fonts */
52-
$link-color: map-get($theme-colors, info) !default;
51+
$link-color: $teal !default;
5352

5453
$navbar-dark-color: rgba(white, .5) !default;
5554
$navbar-light-color: rgba(black, .5) !default;

src/styles/_custom_variables.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@
8181
--ds-home-news-background-color: #{$gray-200};
8282

8383
--ds-breadcrumb-bg: #{$gray-200} !important;
84-
--ds-breadcrumb-link-color: #{$cyan};
84+
--ds-breadcrumb-link-color: #{darken($cyan, 10%)};
8585
--ds-breadcrumb-link-active-color: #{darken($cyan, 30%)};
8686
--ds-breadcrumb-max-length: 200px;
8787

88-
--ds-slider-color: #{$green};
88+
--ds-slider-color: #{darken($green, 20%)};
8989
--ds-slider-handle-width: 18px;
90+
--ds-slider-handle-color: #{darken($blue, 17%)};
9091

9192
--ds-search-form-scope-max-width: 150px;
9293

src/styles/_global-styles.scss

Lines changed: 159 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -220,50 +220,50 @@ ds-dynamic-form-control-container.d-none {
220220
}
221221

222222
.badge-validation {
223-
background-color: #{map-get($theme-colors, warning)};
223+
background-color: #{map-get($theme-colors, warning)};
224224
}
225225

226226
.badge-waiting-controller {
227-
background-color: #{map-get($theme-colors, info)};
227+
background-color: #{map-get($theme-colors, info)};
228228
}
229229

230230
.badge-workspace {
231-
background-color: #{map-get($theme-colors, primary)};
231+
background-color: #{map-get($theme-colors, primary)};
232232
}
233233

234234
.badge-archived {
235-
background-color: #{map-get($theme-colors, success)};
235+
background-color: darken($green, 25);
236236
}
237237

238238
.badge-workflow {
239-
background-color: #{map-get($theme-colors, info)};
239+
background-color: #{map-get($theme-colors, info)};
240240
}
241241

242242
.badge-item-type {
243-
background-color: #{map-get($theme-colors, info)};
243+
background-color: #{map-get($theme-colors, info)};
244244
}
245245

246246
.visually-hidden {
247-
position: absolute !important;
248-
width: 1px !important;
249-
height: 1px !important;
250-
padding: 0 !important;
251-
margin: -1px !important;
252-
overflow: hidden !important;
253-
clip: rect(0, 0, 0, 0) !important;
254-
white-space: nowrap !important;
255-
border: 0 !important;
256-
}
257-
258-
ul.dso-edit-menu-dropdown > li .nav-item.nav-link {
259-
// ensure that links in DSO edit menu dropdowns are unstyled (li elements are styled instead to support icons)
260-
padding: 0;
261-
display: inline;
247+
position: absolute !important;
248+
width: 1px !important;
249+
height: 1px !important;
250+
padding: 0 !important;
251+
margin: -1px !important;
252+
overflow: hidden !important;
253+
clip: rect(0, 0, 0, 0) !important;
254+
white-space: nowrap !important;
255+
border: 0 !important;
256+
}
257+
258+
ul.dso-edit-menu-dropdown>li .nav-item.nav-link {
259+
// ensure that links in DSO edit menu dropdowns are unstyled (li elements are styled instead to support icons)
260+
padding: 0;
261+
display: inline;
262262
}
263263

264264
.table th,
265265
.table td {
266-
vertical-align: middle;
266+
vertical-align: middle;
267267
}
268268

269269
/* Flexbox gap */
@@ -291,29 +291,158 @@ ul.dso-edit-menu-dropdown > li .nav-item.nav-link {
291291

292292

293293
.pt-0\.5 {
294-
padding-top: 0.125rem !important;
294+
padding-top: 0.125rem !important;
295295
}
296296

297297
.pr-0\.5 {
298-
padding-right: 0.125rem !important;
298+
padding-right: 0.125rem !important;
299299
}
300300

301301
.pb-0\.5 {
302-
padding-bottom: 0.125rem !important;
302+
padding-bottom: 0.125rem !important;
303303
}
304304

305305
.pl-0\.5 {
306-
padding-left: 0.125rem !important;
306+
padding-left: 0.125rem !important;
307307
}
308308

309309
.px-0\.5 {
310-
padding-left: 0.125rem !important;
311-
padding-right: 0.125rem !important;
310+
padding-left: 0.125rem !important;
311+
padding-right: 0.125rem !important;
312312
}
313313

314314
.py-0\.5 {
315-
padding-top: 0.125rem !important;
316-
padding-bottom: 0.125rem !important;
315+
padding-top: 0.125rem !important;
316+
padding-bottom: 0.125rem !important;
317+
}
318+
319+
.btn {
320+
&:focus {
321+
outline-offset: 2px !important;
322+
outline-style: solid !important;
323+
outline-width: 2px !important;
324+
box-shadow: none !important;
325+
}
326+
&:disabled {
327+
opacity: 0.7;
328+
}
329+
&.btn-success {
330+
background-color: darken($success, 20%);
331+
border-color: darken($success, 20%);
332+
&:hover {
333+
background-color: darken($success, 30%);
334+
border-color: darken($success, 30%);
335+
}
336+
&:focus {
337+
outline-color: darken($success, 20%);
338+
}
339+
}
340+
&.btn-outline-success {
341+
border-color: darken($success, 20%);
342+
color: darken($success, 20%);
343+
344+
&:hover {
345+
background-color: darken($success, 30%);
346+
color: $white;
347+
}
348+
&:focus {
349+
outline-color: darken($success, 20%);
350+
}
351+
}
352+
&.btn-warning {
353+
background-color: darken($warning, 20%);
354+
&:hover {
355+
background-color: darken($warning, 30%);
356+
}
357+
&:disabled {
358+
background-color: transparent;
359+
}
360+
&:focus {
361+
outline-color: darken($warning, 22%);
362+
}
363+
}
364+
365+
&.btn-outline-warning {
366+
border-color: darken($warning, 20%);
367+
color: darken($warning, 20%);
368+
&:hover {
369+
background-color: darken($warning, 30%);
370+
color: $white;
371+
}
372+
&:disabled {
373+
background-color: transparent;
374+
375+
&:hover {
376+
color: darken($warning, 20%);
377+
}
378+
}
379+
:focus {
380+
outline-color: darken($warning, 22%);
381+
}
382+
&:not(:disabled):hover {
383+
background-color: darken($warning, 22%);
384+
}
385+
}
386+
387+
&.btn-secondary {
388+
&:focus {
389+
outline-color: darken($secondary, 20%);
390+
}
391+
}
392+
393+
&.btn-danger:focus, &.btn-outline-danger:focus {
394+
outline-color: darken($danger, 20%);
395+
}
396+
397+
&.btn-primary:focus, &.btn-outline-primary:focus {
398+
outline-color: darken($primary, 5%);
399+
}
400+
}
401+
402+
dynamic-ng-bootstrap-checkbox .custom-control-input:focus ~ .custom-control-label::before {
403+
outline: 2px solid $gray-700 !important;
404+
box-shadow: none !important;
405+
outline-offset: 2px !important;
406+
}
407+
408+
dynamic-ng-bootstrap-checkbox .custom-control-label::before {
409+
border-color: $gray-700;
410+
}
411+
412+
.text-warning {
413+
color: darken($warning, 10%) !important;
414+
}
415+
416+
.text-success {
417+
color: darken($success, 11%) !important;
418+
}
419+
420+
ngb-accordion {
421+
a.close {
422+
opacity: 0.75;
423+
}
424+
a.close:not(:disabled):not(.disabled):hover {
425+
opacity: 0.9;
426+
}
427+
}
428+
429+
.form-control, .page-link {
430+
&:disabled::placeholder {
431+
color: lighten($gray-700, 10%);
432+
}
433+
&:focus {
434+
box-shadow: none;
435+
outline: 2px solid lighten($gray-700, 10%);
436+
outline-offset: 2px !important;
437+
}
438+
}
439+
440+
.alert-success {
441+
color: darken($success, 22%);
442+
}
443+
444+
.alert-danger {
445+
color: darken($danger, 22%);
317446
}
318447

319448
// Margin utility classes based on DSpace content spacing

src/themes/dspace/styles/_theme_sass_variable_overrides.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $navbar-dark-color: #FFFFFF;
1212
/* Reassign color vars to semantic color scheme */
1313
$blue: #2b4e72 !default;
1414
$green: #92C642 !default;
15-
$cyan: #207698 !default;
15+
$cyan: #1e6f90 !default;
1616
$yellow: #ec9433 !default;
1717
$red: #CF4444 !default;
1818
$dark: #43515f !default;

0 commit comments

Comments
 (0)