From 6fdbee439743449099952853d3d678e277b368fb Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Wed, 28 Feb 2024 16:28:55 +0000 Subject: [PATCH 1/5] remove 'text-shadow' when 'no transparency' enabled --- js/CSSRuleModifiers.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/CSSRuleModifiers.js b/js/CSSRuleModifiers.js index 7912d9c..bdefcce 100644 --- a/js/CSSRuleModifiers.js +++ b/js/CSSRuleModifiers.js @@ -16,6 +16,15 @@ import Color from './Color'; * The `this` context of each function is a reference to Adapt.visua11y */ export default [ + [ + // Remove text shadows + 'text-shadow', + null, + function () { + if (!this.noTransparency) return; + return 'none'; + } + ], [ // Remove box shadows 'box-shadow', From 458ff4ef0343ad5d47b7c7d475e713546b80e2f2 Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Wed, 28 Feb 2024 16:32:49 +0000 Subject: [PATCH 2/5] README 'no transparency' note added --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 71f7fa6..95bc3ea 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ It provides visual accessibility improvements. * In order to support paragraph spacing, all body text needs to be wrapped in [paragraph tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p). * Font size medium is the default font size (16px usually), large is 18pt, small is 9pt. * Hide decorative images is contingent on alt text. +* No transparency removes `box-shadow`, `text-shadow` and `opacity` styles. ### Theme considerations * All colour transformations are applied by mathematical shifts. It is therefore important that the course start from AA colour contrast for the algorithms to be applicable. From 904b4834e8343c600157612a8c05adf9bd1402e3 Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Wed, 6 Mar 2024 14:32:06 +0000 Subject: [PATCH 3/5] for 'no transparency', only remove box-shadow with transparency --- js/CSSRuleModifiers.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/CSSRuleModifiers.js b/js/CSSRuleModifiers.js index bdefcce..2832d72 100644 --- a/js/CSSRuleModifiers.js +++ b/js/CSSRuleModifiers.js @@ -26,11 +26,13 @@ export default [ } ], [ - // Remove box shadows + // Remove box shadows with transparency 'box-shadow', null, - function () { + function (output) { if (!this.noTransparency) return; + const zeroOffsetAndBlur = '0px 0px 0px'; + if (output.includes(zeroOffsetAndBlur)) return; return 'none'; } ], From 41d12969b3632317ae5e0fdeeae929ce3100d6f8 Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Wed, 6 Mar 2024 14:35:47 +0000 Subject: [PATCH 4/5] README 'no transparency' note updated --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95bc3ea..1dbfc0f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ It provides visual accessibility improvements. * In order to support paragraph spacing, all body text needs to be wrapped in [paragraph tags](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p). * Font size medium is the default font size (16px usually), large is 18pt, small is 9pt. * Hide decorative images is contingent on alt text. -* No transparency removes `box-shadow`, `text-shadow` and `opacity` styles. +* No transparency removes `box-shadow` (where transparency is used), `text-shadow` and `opacity` styles. ### Theme considerations * All colour transformations are applied by mathematical shifts. It is therefore important that the course start from AA colour contrast for the algorithms to be applicable. From 855b860d91c30d16dfe20bba60deb8f786f8cb5f Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Tue, 16 Apr 2024 11:07:06 +0100 Subject: [PATCH 5/5] merge pull/112 (#114) * Update: remove legacy nav btn float (fixes #111) #112 * Chore(release): 2.9.0 [skip ci] # [2.9.0](https://github.com/cgkineo/adapt-visua11y/compare/v2.8.2...v2.9.0) (2024-03-18) ### Chore * Update releases.yml to v3 ([f952a65](https://github.com/cgkineo/adapt-visua11y/commit/f952a6516e1ecaa2ad1ccdea544d3cd6a4299469)) ### Update * remove legacy nav btn float (fixes #111) #112 ([4a0d41f](https://github.com/cgkineo/adapt-visua11y/commit/4a0d41f1c0c718f3040512014f85abbc620eed32)), closes [#111](https://github.com/cgkineo/adapt-visua11y/issues/111) [#112](https://github.com/cgkineo/adapt-visua11y/issues/112) --- bower.json | 2 +- less/buttons.less | 1 - package.json | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 1c71802..fb44209 100644 --- a/bower.json +++ b/bower.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/cgkineo/adapt-visua11y.git" }, - "version": "2.8.2", + "version": "2.9.0", "framework": ">=5.31.4", "homepage": "https://github.com/cgkineo/adapt-visua11y", "issues": "https://github.com/cgkineo/adapt-visua11y/issues/new", diff --git a/less/buttons.less b/less/buttons.less index c36bf6d..3744853 100644 --- a/less/buttons.less +++ b/less/buttons.less @@ -1,5 +1,4 @@ .nav__visua11y-btn { - .u-float-right; .icon { .icon-visua11y-accessibility; } diff --git a/package.json b/package.json index 1c71802..fb44209 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/cgkineo/adapt-visua11y.git" }, - "version": "2.8.2", + "version": "2.9.0", "framework": ">=5.31.4", "homepage": "https://github.com/cgkineo/adapt-visua11y", "issues": "https://github.com/cgkineo/adapt-visua11y/issues/new",