Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions dist/css-tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@
right: 50%;
transform: translate(24px, -12px);
}

[data-tooltip].tooltip-light:before {
background: #fff;
color: #333;
}

[data-tooltip].tooltip-light:after {
border-top-color: #fff;
}

[data-tooltip].tooltip-light[class*="tooltip-bottom"]:after {
border-top-color: transparent;
border-bottom-color: #fff;
}
2 changes: 1 addition & 1 deletion dist/css-tooltip.min.css

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

35 changes: 26 additions & 9 deletions src/css-tooltip.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

$background-color : #333;
$foreground-color : #eee;
$arrow-size : 8px;
$vertical-shift : 12px;
$multiline-width : 240px;
$tooltip-padding : 8px 12px;
$roundness : 3px; // 0 || border-radius
$shadow : 0 5px 15px -5px rgba(0, 0, 0, .65); // 0 || box-shadow
$load-styles : true !default; // Extra styles needed?
$background-color : #333;
$foreground-color : #eee;
$light-background-color : #fff;
$arrow-size : 8px;
$vertical-shift : 12px;
$multiline-width : 240px;
$tooltip-padding : 8px 12px;
$roundness : 3px; // 0 || border-radius
$shadow : 0 5px 15px -5px rgba(0, 0, 0, .65); // 0 || box-shadow
$load-styles : true !default; // Extra styles needed?

[data-tooltip] {

Expand Down Expand Up @@ -98,6 +99,22 @@ $load-styles : true !default; // Extra styles needed?
right: 50%;
transform: translate( $arrow-size*3, -$vertical-shift);
}

// Light theme tooltip
&.tooltip-light {
&:before {
background: $light-background-color;
color: $background-color;
}
&:after {
border-top-color: $light-background-color;
}
&[class*="tooltip-bottom"]:after {
border-top-color: transparent;
border-bottom-color: $light-background-color;
}
}

// End extra styles
// ----------------------------------------------------
}
Expand Down