diff --git a/README.md b/README.md index 71f7fa6..1dbfc0f 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` (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. 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/js/CSSRuleModifiers.js b/js/CSSRuleModifiers.js index 7912d9c..2832d72 100644 --- a/js/CSSRuleModifiers.js +++ b/js/CSSRuleModifiers.js @@ -17,14 +17,25 @@ import Color from './Color'; */ export default [ [ - // Remove box shadows - 'box-shadow', + // Remove text shadows + 'text-shadow', null, function () { if (!this.noTransparency) return; return 'none'; } ], + [ + // Remove box shadows with transparency + 'box-shadow', + null, + function (output) { + if (!this.noTransparency) return; + const zeroOffsetAndBlur = '0px 0px 0px'; + if (output.includes(zeroOffsetAndBlur)) return; + return 'none'; + } + ], [ // Increase opacity either way 'opacity', 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",