Skip to content

Commit

Permalink
feat: selection color
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Jan 24, 2024
1 parent 7919fdc commit f6321b8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,42 @@
</main>
</div>
</template>

<style>
/* Global variables */
:root {
--c-selection-color: inherit;
--c-selection-bg: #cce2ff;
--c-input-selection-color: rgba(0, 0, 0, 0.87);
--c-input-selection-bg: #cce2ff;
}
/* selection */
::-webkit-selection {
color: var(--c-selection-color);
background-color: var(--c-selection-bg);
}
::-moz-selection {
color: var(--c-selection-color);
background-color: var(--c-selection-bg);
}
::selection {
color: var(--c-selection-color);
background-color: var(--c-selection-bg);
}
input::-webkit-selection,
textarea::-webkit-selection {
color: var(--c-input-selection-color);
background-color: var(--c-input-selection-bg);
}
input::-moz-selection,
textarea::-moz-selection {
color: var(--c-input-selection-color);
background-color: var(--c-input-selection-bg);
}
input::selection,
textarea::selection {
color: var(--c-input-selection-color);
background-color: var(--c-input-selection-bg);
}
</style>
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (route.query.q) {

<template>
<div class="main">
<div class="mt-10">
<div class="mt-10 select-none">
<span class="text-4xl font-bold">Get Bonus</span>
</div>
<div class="mt-8 flex gap-4">
Expand Down

0 comments on commit f6321b8

Please sign in to comment.