Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UIO focus styling (resolves #231) #233

Merged
merged 77 commits into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
67cc1f8
Merge remote-tracking branch 'upstream/master'
TeddTech Apr 6, 2020
20a7494
Merge remote-tracking branch 'upstream/master'
TeddTech Apr 6, 2020
1b11d50
Merge remote-tracking branch 'upstream/master'
TeddTech Apr 6, 2020
211a5a5
Merge remote-tracking branch 'upstream/master'
TeddTech Apr 9, 2020
8ca4ffa
Merge remote-tracking branch 'upstream/master'
TeddTech Apr 13, 2020
51e7eab
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Apr 15, 2020
247387e
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Apr 21, 2020
a0c2179
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Apr 29, 2020
fb27e7d
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech May 6, 2020
5eb3c71
fix: add uio
TeddTech May 7, 2020
725ddbc
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech May 7, 2020
da22299
Merge branch 'dev' into add-uio
TeddTech May 7, 2020
97017cb
fix: removed infusion folder at root level
TeddTech May 7, 2020
5f96329
fix: infusion npm implementation
TeddTech May 7, 2020
b14d1f0
fix: start figma styling of uio tab
TeddTech May 7, 2020
233b7ed
fix: applied figma styling to uio tap using important
TeddTech May 8, 2020
092bfea
fix: add stylelint workaround
TeddTech May 8, 2020
e055cd6
fix: uio tab styling specificity
TeddTech May 8, 2020
78d1a51
fix: remove uio toc styling
TeddTech May 8, 2020
3818497
fix: add uio contrast focus styling
TeddTech May 11, 2020
e0e1671
fix: add roboto font on uio tab
TeddTech May 11, 2020
7e2b072
fix: use box shadow instead of border for focus and hover
TeddTech May 12, 2020
c846398
fix: implement cindys uiowecount infusion branch
TeddTech May 14, 2020
a351d48
fix: used preload value on link tags for performance improvement
TeddTech May 14, 2020
abe2cb9
fix: focus/hover styling to cards and search for uio contrast options
TeddTech May 14, 2020
50bcad6
fix: redo remove text size panel from uio options
TeddTech May 14, 2020
4da980e
fix: point infusion to 3.0.0-dev.20200513T135321Z.3ebc41052.FLUID-6145
TeddTech May 14, 2020
ac1cc2d
fix: updated infusion v to dev.20200514T192349Z.6ec8e0fcf.UIO-WeCount
TeddTech May 14, 2020
499de18
fix: updated package.lock to reflect infustion update
TeddTech May 14, 2020
deef358
fix: added swap value to font display for font-faces
TeddTech May 15, 2020
7ac9ce1
fix: remove card svg from uio contrast options
TeddTech May 15, 2020
b75e5b9
fix: properly format basenjk using tabs
TeddTech May 19, 2020
abb4cac
fix: preload fonts
TeddTech May 19, 2020
45a5804
fix: added link stylsheet elements for css files
TeddTech May 19, 2020
9ed5f98
fix: formated base njk
TeddTech May 21, 2020
e3d30d3
fix: use colour code from infusion
TeddTech May 21, 2020
67a4594
fix: uio tab not working
TeddTech May 21, 2020
9ba17c8
fix: added lighthouse performance comments
TeddTech May 22, 2020
9e0d2d7
fix: add latest infusion version publication
TeddTech May 25, 2020
330d1be
fix: merged add-uio branch after performance improvements
TeddTech May 25, 2020
a3986f5
fix: fluiduioptions merge conflict
TeddTech May 25, 2020
e7a469b
fix: hover and focus stlying to uio tab
TeddTech May 26, 2020
35d52ea
fix: remove comments from uio tab hover and focus styling
TeddTech May 26, 2020
18a4d6a
Merge branch 'add-uio' into uio-focus-styling
TeddTech May 26, 2020
1abd850
fix: remove toc styling
TeddTech May 26, 2020
a04dfe5
fix: added styling for current page pagination
TeddTech May 26, 2020
d3628e9
fix: hover and focus styling comment in vendors scss
TeddTech May 26, 2020
3b4be93
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech May 27, 2020
a16d8ea
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 1, 2020
5c813fb
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 1, 2020
c3f6f41
Merge branch 'dev' into uio-focus-styling
TeddTech Jun 1, 2020
6888687
fix: apply uio specific styles to uio plus themes
TeddTech Jun 1, 2020
bf7994d
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 2, 2020
b1b7484
Merge branch 'dev' into uio-focus-styling
TeddTech Jun 2, 2020
1dba701
fix: add hover and focus styling to contrast uio tab
TeddTech Jun 2, 2020
e056019
fix: refactor vendors scss
TeddTech Jun 2, 2020
5a04e46
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 2, 2020
8e03e09
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 2, 2020
8318a6c
Merge branch 'dev' into uio-focus-styling
TeddTech Jun 2, 2020
b4f2b6b
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 3, 2020
74cefef
Merge branch 'dev' into uio-focus-styling
TeddTech Jun 3, 2020
01ad22f
fix: replace foregroundColor with fColor and backgroundColor with bColor
TeddTech Jun 4, 2020
e728734
fix: add media query to vendors scss
TeddTech Jun 4, 2020
92f3ee2
fix: removed duplicate uio themes variable
TeddTech Jun 4, 2020
28f1d59
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 4, 2020
a42b255
fix: refractored vendors and mixins scss and added comments
TeddTech Jun 4, 2020
9d5e0b1
fix: removed uneeded comments form mixins
TeddTech Jun 4, 2020
5125487
Merge remote-tracking branch 'upstream/dev' into dev
TeddTech Jun 8, 2020
05557f0
Merge branch 'dev' into uio-focus-styling
TeddTech Jun 8, 2020
1343c9a
fix: refactored contrast theme styling
TeddTech Jun 8, 2020
f15442b
fix: remove uneeded comment
TeddTech Jun 8, 2020
6833bcb
fix: properly formated rem functions with negative input
TeddTech Jun 8, 2020
5ad376d
fix: moved each before media queries
TeddTech Jun 8, 2020
90eb719
fix: refactored all uio contrast themes stlyling into mixins scss
TeddTech Jun 8, 2020
a94b98d
fix: placed media query for svg positioning inside mixins scss
TeddTech Jun 8, 2020
88869eb
fix: added padding to uio tab on enhance inputs
TeddTech Jun 8, 2020
9952e7b
fix: css clean up and adjust code comments
cindyli Jun 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 99 additions & 10 deletions src/scss/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,107 @@
// Mixins.
@mixin adapt-to-highContrast($fColor, $bColor) {
// Social media icons
footer .footer-content .social-media .social-media-icons a {
svg path {
fill: currentColor;
stroke: $bColor;

// To adapt to UIO high contrast themes
@mixin adapt-to-contrastThemes($fColor, $bColor) {
// WeCount logo
.logo circle,
.logo path {
fill: none;
stroke: var(--logo-stroke, currentColor);
stroke-linecap: round;
stroke-width: rem(3);
}
// Search icon; IDRC, OCADU and Canada logos
header .site-nav-wrapper .site-nav .search-container svg {
fill: currentColor;
height: rem(19.2);
margin: rem(-25.6);
width: rem(19.2);
}

// Canada logo
--theme-link-fill: currentColor;

// Placeholder images on the "views" page
svg.news-item-img use {
stroke: var(--placeholder-stroke, currentColor);
stroke-linecap: round;
stroke-width: rem(3);
}

footer .footer-content {
// fix overlap of box-shadow on footer links
.funders a,
.footer-logos a {
padding: rem(5);
}
// Social media icons
.social-media .social-media-icons a {
svg path {
fill: currentColor;
stroke: $bColor;
}

&:hover,
&:focus {
svg path {
fill: $bColor;
stroke: currentColor;
}
}
}
}

// UIO focus style focus/hover styles for links in uio contrast themes
#defaultContainer a:focus,
#defaultContainer a:hover,
#defaultContainer header .site-nav-wrapper .site-nav nav a:focus,
#defaultContainer header .site-nav-wrapper .site-nav nav a:hover,
#defaultContainer .content-wrapper .tags-info .tags a:focus,
#defaultContainer .content-wrapper .tags-info .tags a:hover,
#search-form input,
.card:focus,
.card:hover,
button:focus,
button:hover,
li .pagination-link,
li .pagination-link::before {
box-shadow: inset 0 0 0 rem(2) currentColor;
}

#defaultContainer {
// fix overlap of box-shadow on buttons
.fl-prefsEditor-buttons button {
padding-left: rem(3);
padding-right: rem(3);
}

// undo default focus/hover styling on next, previous and current pagination
.content-wrapper main .pagination .pagination-list {
.pagination-next,
.pagination-previous,
li a[aria-current="page"]::before {
box-shadow: none;
}
}

// cards and homepage have no background in contrast themes
.blue,
.green,
.yellow {
background-image: none;
}
}

// Current page pagination styling for uio contrast themes
#defaultContainer .content-wrapper main .pagination .pagination-list li a[aria-current="page"] {
background-color: $fColor !important; // Enactors.css in infusion uses !important on this element
box-shadow: none;
color: $bColor !important; // Enactors.css in infusion uses !important on this element
&:hover,
&:focus {
svg path {
fill: $bColor;
stroke: currentColor;
}
box-shadow:
0 0 0 rem(4) $bColor,
0 0 0 rem(6) $fColor;
}
}

Expand Down
69 changes: 28 additions & 41 deletions src/scss/vendors/_vendors.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Vendor-specific styles.

//UIO
// UIO

// UIO tab styling
#defaultContainer .fl-prefsEditor-separatedPanel .fl-panelBar {
border-bottom: none;
box-shadow: none;
Expand Down Expand Up @@ -31,6 +32,7 @@
}
}

// Stlying for when enhance inputs is turned on
.fl-input-enhanced #defaultContainer .fl-prefsEditor-separatedPanel .fl-panelBar .fl-prefsEditor-buttons {
display: inline-block;
height: rem(88);
Expand Down Expand Up @@ -61,7 +63,22 @@
}
}

@media screen and (min-width: 40em) { // This media query breakpoint comes from the infusion preferences framework for UIO in order to customize UIO button styles on desktop and mobile.
// For styles that require foreground and background colors from each theme
@each $theme, $fColor, $bColor in $UIOThemes {
.fl-theme-#{$theme}, .gpii-ext-theme-#{$theme} {
// WeCount logo
--logo-stroke: #{$fColor};

// The placeholder svg on the "views" page
--theme-background-fill: #{$bColor};
--placeholder-stroke: #{$fColor};

@include adapt-to-contrastThemes($fColor, $bColor);
}
}

// This media query breakpoint comes from the infusion preferences framework for UIO in order to customize UIO button styles on desktop and mobile.
@media screen and (min-width: 40em) {
.fl-input-enhanced #defaultContainer header .fl-prefsEditor-separatedPanel .fl-panelBar .fl-prefsEditor-buttons {
display: block;
height: auto;
Expand Down Expand Up @@ -89,44 +106,14 @@
}
}

// To adapt to UIO high contrast themes
[class^="gpii-ext-theme"],
[class^="fl-theme"]:not(.fl-theme-prefsEditor-default) {
// WeCount logo
.logo circle,
.logo path {
fill: none;
stroke: var(--logo-stroke, currentColor);
stroke-linecap: round;
stroke-width: rem(3);
}

// Search icon; IDRC, OCADU and Canada logos
header .site-nav-wrapper .site-nav .search-container svg {
fill: currentColor;
}

// Canada logo
--theme-link-fill: currentColor;

// Placeholder images on the "views" page
svg.news-item-img use {
stroke: var(--placeholder-stroke, currentColor);
stroke-linecap: round;
stroke-width: rem(3);
}
}

// For styles that require foreground and background colors from each theme
@each $theme, $fColor, $bColor in $UIOThemes {
.fl-theme-#{$theme}, .gpii-ext-theme-#{$theme} {
// WeCount logo
--logo-stroke: #{$fColor};

// The placeholder svg on the "views" page
--theme-background-fill: #{$bColor};
--placeholder-stroke: #{$fColor};

@include adapt-to-highContrast($fColor, $bColor);
@media screen and (min-width: 1024px) {
[class^="gpii-ext-theme"],
[class^="fl-theme"]:not(.fl-theme-prefsEditor-default) {
// Search icon; IDRC, OCADU and Canada logos
header .site-nav-wrapper .site-nav .search-container svg {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this css needs to be moved out of the generic selector into theme specific selectors too. Seems you need another loop on $UIOThemes here.

height: rem(24);
margin: rem(-40);
width: rem(24);
}
}
}