Skip to content

Commit

Permalink
use .tippy-box:not([data-theme])
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed May 2, 2024
1 parent a339477 commit d2bafe2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions web_src/js/components/ActivityHeatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,14 @@ export default {
/>
</template>
<style>
/* A quick patch for vue3-calendar-heatmap's tooltip padding, to avoid conflicting with other tippy contents.
/* A quick patch for vue3-calendar-heatmap's tooltip padding.
At the moment we could only identify the tooltip by its transition property.
https://github.com/razorness/vue3-calendar-heatmap/blob/955626176cb5dc3d3ead8120475c2e5e753cc392/src/components/CalendarHeatmap.vue#L202
This selector should be replaced by a more specific one if the library adds a CSS class.
TODO: Remove this after https://github.com/razorness/vue3-calendar-heatmap/pull/34 is merged and released,
and then all styles could be merged into `.tippy-box` selector.
TODO: Remove this after https://github.com/razorness/vue3-calendar-heatmap/pull/34 is merged and released.
*/
[data-tippy-root][style*="transition: transform 0.1s ease-out"] .tippy-box {
.tippy-box:not([data-theme]) {
border: none;
}
/* some styles are put on the tippy-content intentionally, otherwise there will be strange animations */
[data-tippy-root][style*="transition: transform 0.1s ease-out"] .tippy-box .tippy-content {
transition: none !important;
padding: 0.5rem 1rem;
background-color: var(--color-tooltip-bg);
color: var(--color-tooltip-text);
Expand Down

0 comments on commit d2bafe2

Please sign in to comment.