-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ProfilePicker: Use css_to_wrapper() for Polymer styles.
Bug: 1322682 Change-Id: Iacb253d11dc23c35ad1e220e1a628b21bd4080b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3639730 Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Monica Basta <msalama@chromium.org> Commit-Queue: Monica Basta <msalama@chromium.org> Cr-Commit-Position: refs/heads/main@{#1002001}
- Loading branch information
Showing
16 changed files
with
214 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
...browser/resources/signin/profile_picker/profile_creation_flow/profile_creation_shared.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* Copyright 2022 The Chromium Authors. All rights reserved. | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. */ | ||
|
||
/* #css_wrapper_metadata_start | ||
* #type=style | ||
* #import=chrome://resources/cr_elements/shared_vars_css.m.js | ||
* #import=chrome://resources/cr_elements/cr_icons_css.m.js | ||
* #import=../profile_picker_shared.css.js | ||
* #include=cr-icons profile-picker-shared | ||
* #css_wrapper_metadata_end */ | ||
|
||
:host { | ||
--avatar-size: 100px; | ||
--banner-height: 244px; | ||
} | ||
|
||
#leftBanner { | ||
background: url(../images/left_banner_image.svg); | ||
left: 0; | ||
} | ||
|
||
#rightBanner { | ||
background: url(../images/right_banner_image.svg); | ||
right: 0; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
#leftBanner { | ||
background: url(../images/dark_mode_left_banner_image.svg); | ||
} | ||
|
||
#rightBanner { | ||
background: url(../images/dark_mode_right_banner_image.svg); | ||
} | ||
} | ||
|
||
#headerContainer { | ||
height: var(--banner-height); | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.banner { | ||
height: 400px; | ||
overflow: hidden; | ||
position: absolute; | ||
top: 0; | ||
width: 169px; | ||
z-index: -1; | ||
} | ||
|
||
#backButton { | ||
--cr-icon-button-icon-size: 22px; | ||
--cr-icon-button-margin-start: 4px; | ||
--cr-icon-button-size: 36px; | ||
margin-inline-start: 16px; | ||
margin-top: 4px; | ||
position: relative; | ||
z-index: 1; | ||
} | ||
|
||
@media (forced-colors: none) { | ||
#backButton { | ||
--cr-icon-button-fill-color: var(--cr-secondary-text-color); | ||
} | ||
} | ||
|
||
#avatarContainer { | ||
bottom: calc(var(--avatar-size) / -2); | ||
height: calc(var(--avatar-size) + 4px); | ||
left: 0; | ||
margin: auto; | ||
position: absolute; | ||
right: 0; | ||
width: calc(var(--avatar-size) + 4px); | ||
} | ||
|
||
.avatar { | ||
border: 2px solid var(--md-background-color); | ||
border-radius: 50%; | ||
height: var(--avatar-size); | ||
width: var(--avatar-size); | ||
z-index: 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 0 additions & 77 deletions
77
chrome/browser/resources/signin/profile_picker/profile_creation_flow/shared_css.html
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
chrome/browser/resources/signin/profile_picker/profile_creation_flow/shared_css.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
chrome/browser/resources/signin/profile_picker/profile_picker_shared.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/* Copyright 2022 The Chromium Authors. All rights reserved. | ||
* Use of this source code is governed by a BSD-style license that can be | ||
* found in the LICENSE file. */ | ||
|
||
/* #css_wrapper_metadata_start | ||
* #type=style | ||
* #import=chrome://resources/cr_elements/shared_style_css.m.js | ||
* #import=chrome://resources/cr_elements/shared_vars_css.m.js | ||
* #include=cr-shared-style | ||
* #css_wrapper_metadata_end */ | ||
|
||
:host { | ||
--profile-card-avatar-icon-size: 74px; | ||
--text-font-size: 1.16em; | ||
--scrollbar-width: 4px; | ||
--scrollbar-background: var(--google-grey-100); | ||
--footer-spacing: 40px; | ||
--profile-card-hover-color: var(--md-background-color); | ||
--profile-item-height: 178px; | ||
--profile-item-width: 162px; | ||
} | ||
|
||
html { | ||
font-family: roboto; | ||
} | ||
|
||
h2 { | ||
color: var(--cr-primary-text-color); | ||
font-size: 1.85em; | ||
font-weight: normal; | ||
} | ||
|
||
h3 { | ||
color: var(--cr-secondary-text-color); | ||
font-size: var(--text-font-size); | ||
font-weight: normal; | ||
} | ||
|
||
.profile-card-info { | ||
--profile-card-info-height: 52px; | ||
color: var(--cr-primary-text-color); | ||
height: 20px; | ||
overflow: hidden; | ||
position: absolute; | ||
text-align: center; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
|
||
.profile-card-info.prominent-text { | ||
font-size: var(--text-font-size); | ||
font-weight: 500; | ||
padding: 16px; | ||
width: 130px; | ||
} | ||
|
||
.profile-card-info.secondary-text { | ||
padding: 16px 10px; | ||
width: 142px; | ||
} | ||
|
||
.footer { | ||
bottom: 0; | ||
display: flex; | ||
font-size: var(--text-font-size); | ||
padding-bottom: var(--footer-spacing); | ||
padding-top: var(--footer-spacing); | ||
position: absolute; | ||
width: 100%; | ||
} | ||
|
||
.footer.division-line { | ||
border-top: 1px solid var(--google-grey-300); | ||
} | ||
|
||
.custom-scrollbar::-webkit-scrollbar { | ||
width: var(--scrollbar-width); | ||
} | ||
|
||
/* Track */ | ||
.custom-scrollbar::-webkit-scrollbar-track { | ||
border-radius: var(--scrollbar-width); | ||
} | ||
|
||
/* Handle */ | ||
.custom-scrollbar::-webkit-scrollbar-thumb { | ||
background: var(--scrollbar-background); | ||
border-radius: var(--scrollbar-width); | ||
} | ||
|
||
.profile-avatar { | ||
border-radius: 50%; | ||
flex-shrink: 0; | ||
height: var(--profile-card-avatar-icon-size); | ||
width: var(--profile-card-avatar-icon-size); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
:host { | ||
--scrollbar-background: var(--google-grey-800); | ||
--profile-card-hover-color: var(--google-grey-800); | ||
} | ||
|
||
.footer.division-line { | ||
border-top-color: var(--cr-separator-color); | ||
} | ||
} |
Oops, something went wrong.