Skip to content

Commit

Permalink
(liferay#1242) - (LexiconCSS) SVG Icons added `.lexicon-icon-containe…
Browse files Browse the repository at this point in the history
…r` to wrap svg icons so we can have the icon name spoken for screen readers at bare minimum
  • Loading branch information
pat270 committed Nov 14, 2018
1 parent 9673a13 commit 051129b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/scss/lexicon-base/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@
}
}

.btn-action .lexicon-icon {
display: block;
height: 100%;
margin: auto;
.btn-action {
.lexicon-icon-container,
.lexicon-icon {
display: block;
height: 100%;
margin: auto;
}
}

.btn-action-secondary {
Expand Down
15 changes: 14 additions & 1 deletion src/scss/lexicon-base/_icons.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
.lexicon-icon-container {
display: inline-block;
vertical-align: middle;

.lexicon-icon {
display: block;
}
}

.lexicon-icon {
display: inline-block;
fill: currentColor;
height: $lexicon-icon-size;
pointer-events: none;
transform: translateZ(0);
vertical-align: middle;
width: $lexicon-icon-size;
Expand Down Expand Up @@ -45,6 +53,7 @@ a.collapse-icon {
.collapse-icon-open {
[class^="icon-"],
[class*=" icon-"],
.lexicon-icon-container,
.lexicon-icon {
display: block;
}
Expand Down Expand Up @@ -186,6 +195,10 @@ a .icon-monospaced,

padding: $icon-monospaced-lexicon-icon-padding;
}

.lexicon-icon-container {
display: block;
}
}

// Help Icon
Expand Down
4 changes: 4 additions & 0 deletions src/scss/lexicon-base/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
float: left;
line-height: $pagination-line-height;

.lexicon-icon-container .lexicon-icon {
margin-left: 0;
}

[class*="icon-"] {
margin-left: 10px;
}
Expand Down

0 comments on commit 051129b

Please sign in to comment.