Skip to content

Commit

Permalink
Merge pull request #137 from locness3/patch-1
Browse files Browse the repository at this point in the history
Use a variable for foreground/text color
  • Loading branch information
kazzkiq authored Apr 16, 2020
2 parents 4373ec0 + 1deb823 commit f306983
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions balloon.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
--balloon-border-radius: 2px;
--balloon-color: rgba(16, 16, 16, 0.95);
--balloon-text-color: #fff;
--balloon-font-size: 12px;
--balloon-move: 4px; }

Expand All @@ -13,16 +14,16 @@ button[aria-label][data-balloon-pos] {
[aria-label][data-balloon-pos]:after {
opacity: 0;
pointer-events: none;
transition: all .18s ease-out .18s;
transition: all 0.18s ease-out 0.18s;
text-indent: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-weight: normal;
font-style: normal;
text-shadow: none;
font-size: var(--balloon-font-size);
background: var(--balloon-color);
border-radius: var(--balloon-border-radius);
color: #fff;
color: var(--balloon-foreground-color);
content: attr(aria-label);
padding: .5em 1em;
position: absolute;
Expand All @@ -35,7 +36,7 @@ button[aria-label][data-balloon-pos] {
border-top-color: var(--balloon-color);
opacity: 0;
pointer-events: none;
transition: all .18s ease-out .18s;
transition: all 0.18s ease-out 0.18s;
content: "";
position: absolute;
z-index: 10; }
Expand Down
2 changes: 1 addition & 1 deletion balloon.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/balloon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
:root {
--balloon-border-radius: 2px;
--balloon-color: #{$balloon-bg};
--balloon-text-color: #fff;
--balloon-font-size: #{$balloon-base-size};
--balloon-move: #{$balloon-move};
}
Expand All @@ -42,8 +43,10 @@ button[aria-label] {
@include normalized-text();

background: var(--balloon-color);
border-radius: 2px;
color: var(--balloon-foreground-color);
border-radius: var(--balloon-border-radius);
color: #fff;
color: var(--balloon-foreground-color);
content: attr(aria-label);
padding: .5em 1em;
position: absolute;
Expand Down

0 comments on commit f306983

Please sign in to comment.