Move cookie consent styles into own file and add pf- prefix Change-Id: I26d450502740dbcd97a66a5e2f568ffcda988d57
diff --git a/ui/src/assets/common.scss b/ui/src/assets/common.scss index 1f30989..99b35e1 100644 --- a/ui/src/assets/common.scss +++ b/ui/src/assets/common.scss
@@ -140,38 +140,3 @@ button.close { font-family: var(--monospace-font); } - -.cookie-consent { - position: absolute; - z-index: 10; - left: 10px; - bottom: 10px; - width: 550px; - background-color: #19212b; - font-size: 14px; - color: rgb(180, 183, 186); - border-radius: 5px; - padding: 20px; - - .buttons { - display: flex; - justify-content: flex-end; - margin-top: 10px; - font-size: 15px; - } - - button { - padding: 10px; - border-radius: 3px; - color: #fff; - margin-left: 5px; - a { - text-decoration: none; - color: #fff; - } - } - button:hover { - background-color: #373f4b; - cursor: pointer; - } -}
diff --git a/ui/src/assets/cookie_consent.scss b/ui/src/assets/cookie_consent.scss new file mode 100644 index 0000000..f81fc54 --- /dev/null +++ b/ui/src/assets/cookie_consent.scss
@@ -0,0 +1,48 @@ +// Copyright (C) 2025 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +.pf-cookie-consent { + position: absolute; + z-index: 10; + left: 10px; + bottom: 10px; + width: 550px; + background-color: #19212b; + font-size: 14px; + color: rgb(180, 183, 186); + border-radius: 5px; + padding: 20px; + + .buttons { + display: flex; + justify-content: flex-end; + margin-top: 10px; + font-size: 15px; + } + + button { + padding: 10px; + border-radius: 3px; + color: #fff; + margin-left: 5px; + a { + text-decoration: none; + color: #fff; + } + } + button:hover { + background-color: #373f4b; + cursor: pointer; + } +}
diff --git a/ui/src/assets/perfetto.scss b/ui/src/assets/perfetto.scss index 89f2ef8..817b1ea 100644 --- a/ui/src/assets/perfetto.scss +++ b/ui/src/assets/perfetto.scss
@@ -23,6 +23,7 @@ @import "details"; @import "trace_info_page"; @import "statusbar"; +@import "cookie_consent"; // Widgets/components - keep these sorted alphabetically @import "components/aggregation_adapter";
diff --git a/ui/src/core/cookie_consent.ts b/ui/src/core/cookie_consent.ts index c1aff04..26f2b48 100644 --- a/ui/src/core/cookie_consent.ts +++ b/ui/src/core/cookie_consent.ts
@@ -33,7 +33,7 @@ view() { if (!this.showCookieConsent) return; return m( - '.cookie-consent', + '.pf-cookie-consent', m( '.cookie-text', `This site uses cookies from Google to deliver its services and to