Skip to content

Commit

Permalink
Merge pull request #1055 from bolt-design-system/feature/bolt-tool-ie…
Browse files Browse the repository at this point in the history
…11-only-mixin

Dev tool: IE11-only SCSS mixin
  • Loading branch information
danielamorse authored Jan 24, 2019
2 parents 8d3b17c + 89e8d56 commit 786ed53
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2,298 deletions.
2 changes: 1 addition & 1 deletion packages/components/lists/bolt-li/src/li.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ bolt-ol {
}

// [Mai] This is an IE specific fix to center the number inside the circle. IE calculates line-height differently.
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
@include bolt-ie11-only {
.c-bolt-li--ol-item:before {
line-height: $bolt-line-height--medium;
}
Expand Down
9 changes: 9 additions & 0 deletions packages/core/styles/02-tools/tools-ie11-only/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @bolt/tools-ie11-only
Define CSS that only targets Internet Explorer 11.

- [Sass Docs](https://www.boltdesignsystem.com/docs/#tools: ie11-only)

## Install
```bash
npm install @bolt/tools-ie11-only
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* ------------------------------------ *\
IE11 Only CSS
\* ------------------------------------ */

////
/// @group Tools: Utilities
/// @author Mike Mai
////

/// Define CSS that only targets Internet Explorer 11.
/// @example scss
/// .element {
/// @include bolt-ie11-only {
/// display: block;
/// }
/// }
@mixin bolt-ie11-only() {
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
@content;
}
}
1 change: 1 addition & 0 deletions packages/core/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
@import '02-tools/tools-font-size/_tools-font-size';
@import '02-tools/tools-font-weight/_tools-font-weight';
@import '02-tools/tools-full-bleed/_tools-full-bleed';
@import '02-tools/tools-ie11-only/_tools-ie11-only';
@import '02-tools/tools-linear-interpolation/_tools-linear-interpolation';
@import '02-tools/tools-list-remove/_tools-list-remove';
@import '02-tools/tools-list-sort/_tools-list-sort';
Expand Down
Loading

0 comments on commit 786ed53

Please sign in to comment.