Skip to content

Commit bb7b69b

Browse files
authored
Merge pull request #67 from jackdomleo7/63_customise_attribute
2 parents b43a5be + 9baa283 commit bb7b69b

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/_tooltip.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
var(--cooltipz-border-color, #{$cooltipz-border-color});
1515
box-shadow: 0 0 0.1875rem $cooltipz-shadow-color;
1616
color: var(--cooltipz-text-color, #{$cooltipz-text-color});
17-
content: attr(aria-label);
17+
content: attr(#{$cooltipz-attribute});
1818
font-family: Verdana, Geneva, Tahoma, var(--cooltipz-fontawesome, Arial), sans-serif;
1919
font-size: var(--cooltipz-font-size, #{$cooltipz-font-size});
2020
-webkit-font-smoothing: antialiased;

src/cooltipz.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/*! Cooltipz.css v2.0.0 | MIT License | github.com/jackdomleo7/Cooltipz.css */
22

3+
@forward "./variables/scss";
4+
@use "./variables/scss" as *;
35
@use "./variables/css" as *;
46
@use "./tooltip" as *;
57
@use "./animations" as *;
@@ -12,7 +14,7 @@
1214
::after = tooltip box and content
1315
*/
1416

15-
[aria-label] { // Required
17+
[#{$cooltipz-attribute}] { // Required
1618
&[data-cooltipz-dir], // Required
1719
&[class*="cooltipz"] { // Required
1820
// Default

src/variables/_scss.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ $cooltipz-large: 18.75rem !default;
1414
$cooltipz-arrow-size: 0.3125rem !default;
1515
$cooltipz-delay-show: 0s !default;
1616
$cooltipz-delay-hide: 0s !default;
17+
$cooltipz-attribute: "aria-label" !default;
1718
$cooltipz-shadow-color: rgb(0 0 0 / 30%);

0 commit comments

Comments
 (0)