1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-12 06:23:38 +00:00

Use tailwind classes instead of custom sticky header class

This commit is contained in:
Jeffrey Holland
2025-08-22 16:00:02 +02:00
parent 383c0ec25c
commit 9d8cf94215
4 changed files with 3 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
<div class="tw-flex tw-flex-col tw-h-full tw-bg-background-alt">
<bit-section
disableMargin
class="tw-app-region-header-sticky tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300"
class="tw-sticky tw-top-0 tw-z-[1] tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300"
>
<bit-section-header class="tw-app-region-drag tw-bg-background">
<div class="tw-flex tw-items-center">

View File

@@ -1,7 +1,7 @@
<div class="tw-flex tw-flex-col tw-h-full">
<bit-section
disableMargin
class="tw-app-region-header-sticky tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300"
class="tw-sticky tw-top-0 tw-z-[1] tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300"
>
<bit-section-header class="tw-app-region-drag tw-bg-background">
<div class="tw-flex tw-items-center">

View File

@@ -184,12 +184,7 @@ export default tseslint.config(
{
// uses negative lookahead to whitelist any class that doesn't start with "tw-"
// in other words: classnames that start with tw- must be valid TailwindCSS classes
whitelist: [
"(?!(tw)\\-).*",
"tw-app-region-drag",
"tw-app-region-no-drag",
"tw-app-region-header-sticky",
],
whitelist: ["(?!(tw)\\-).*", "tw-app-region-drag", "tw-app-region-no-drag"],
},
],
"tailwindcss/enforces-negative-arbitrary-values": "error",

View File

@@ -184,12 +184,6 @@
-webkit-app-region: no-drag;
}
.tw-app-region-header-sticky {
position: sticky;
top: 0;
z-index: 1;
}
/**
* Bootstrap uses z-index: 1050 for modals, dialogs and drag-and-drop previews should appear above them.
* When bootstrap is removed, test if these styles are still needed and that overlays display properly over other content.