Commit e2e7a400 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI: Replace --cr-form-field-label with a cr-form-field-label class

https://imgur.com/a/x0iNkYr

Bug: 973674
Change-Id: I817474ff3a681f625c86be9cc1e6eb57f04eea26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1700260Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678381}
parent c49f8dba
...@@ -29,10 +29,6 @@ ...@@ -29,10 +29,6 @@
width: 100%; width: 100%;
} }
.label {
@apply --cr-form-field-label;
}
#prompt { #prompt {
margin-bottom: 20px; margin-bottom: 20px;
} }
...@@ -95,4 +91,4 @@ ...@@ -95,4 +91,4 @@
<body> <body>
<confirm-password-change id="main-element"></confirm-password-change> <confirm-password-change id="main-element"></confirm-password-change>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/cr.html"> <link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
<dom-module id="settings-address-edit-dialog"> <dom-module id="settings-address-edit-dialog">
<template> <template>
<style include="settings-shared md-select"> <style include="cr-shared-style settings-shared md-select">
:host { :host {
white-space: nowrap; white-space: nowrap;
} }
...@@ -37,14 +38,6 @@ ...@@ -37,14 +38,6 @@
--md-select-width: var(--settings-input-max-width); --md-select-width: var(--settings-input-max-width);
} }
#select-label {
@apply --cr-form-field-label;
}
:host-context([dir=rtl]) #select-label {
transform-origin: right;
}
.long { .long {
width: var(--settings-input-max-width); width: var(--settings-input-max-width);
} }
...@@ -93,7 +86,9 @@ ...@@ -93,7 +86,9 @@
</div> </div>
</template> </template>
<div id="select-row" class="address-row"> <div id="select-row" class="address-row">
<div id="select-label">$i18n{addressCountry}</div> <label id="select-label" class="cr-form-field-label">
$i18n{addressCountry}
</label>
<select class="md-select" aria-labelledby="select-label" <select class="md-select" aria-labelledby="select-label"
value="[[countryCode_]]" on-change="onCountryChange_"> value="[[countryCode_]]" on-change="onCountryChange_">
<option value=""></option> <option value=""></option>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html"> <link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
<dom-module id="settings-credit-card-edit-dialog"> <dom-module id="settings-credit-card-edit-dialog">
<template> <template>
<style include="settings-shared md-select"> <style include="cr-shared-style settings-shared md-select">
cr-input { cr-input {
--cr-input-error-display: none; --cr-input-error-display: none;
margin-bottom: var(--cr-form-field-bottom-spacing); margin-bottom: var(--cr-form-field-bottom-spacing);
...@@ -56,10 +57,6 @@ ...@@ -56,10 +57,6 @@
#year { #year {
width: 100px; width: 100px;
} }
label {
@apply --cr-form-field-label;
}
</style> </style>
<cr-dialog id="dialog" close-text="$i18n{close}"> <cr-dialog id="dialog" close-text="$i18n{close}">
<div slot="title">[[title_]]</div> <div slot="title">[[title_]]</div>
...@@ -72,10 +69,12 @@ ...@@ -72,10 +69,12 @@
value="{{creditCard.cardNumber}}" value="{{creditCard.cardNumber}}"
on-input="onCreditCardNameOrNumberChanged_"> on-input="onCreditCardNameOrNumberChanged_">
</cr-input> </cr-input>
<label>$i18n{creditCardExpiration}</label> <label id="creditCardExpiration" class="cr-form-field-label">
$i18n{creditCardExpiration}
</label>
<select class="md-select" id="month" value="[[expirationMonth_]]" <select class="md-select" id="month" value="[[expirationMonth_]]"
on-change="onMonthChange_" on-change="onMonthChange_"
aria-label="$i18n{creditCardExpirationMonth}"> aria-labelledby="creditCardExpiration">
<template is="dom-repeat" items="[[monthList_]]"> <template is="dom-repeat" items="[[monthList_]]">
<option>[[item]]</option> <option>[[item]]</option>
</template> </template>
......
<link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input_style_css.html">
<dom-module id="settings-textarea"> <dom-module id="settings-textarea">
<template> <template>
<style include="cr-hidden-style cr-input-style"> <style include="cr-hidden-style cr-input-style cr-shared-style">
textarea { textarea {
display: block; display: block;
resize: none; resize: none;
...@@ -19,7 +20,9 @@ ...@@ -19,7 +20,9 @@
position: static; position: static;
} }
</style> </style>
<div id="label" hidden="[[!label]]">[[label]]</div> <div id="label" class="cr-form-field-label" hidden="[[!label]]">
[[label]]
</div>
<div id="input-container"> <div id="input-container">
<!-- The textarea is limited to |rows| height. If the content exceeds the <!-- The textarea is limited to |rows| height. If the content exceeds the
bounds, it scrolls by default. No space or comments are allowed bounds, it scrolls by default. No space or comments are allowed
......
...@@ -19,10 +19,6 @@ ...@@ -19,10 +19,6 @@
<dom-module id="kerberos-add-account-dialog"> <dom-module id="kerberos-add-account-dialog">
<template> <template>
<style include="settings-shared action-link"> <style include="settings-shared action-link">
.label {
@apply --cr-form-field-label;
}
#advancedConfigDesc { #advancedConfigDesc {
align-items: center; align-items: center;
display: flex; display: flex;
...@@ -141,4 +137,4 @@ ...@@ -141,4 +137,4 @@
</template> </template>
</template> </template>
<script src="kerberos_add_account_dialog.js"></script> <script src="kerberos_add_account_dialog.js"></script>
</dom-module> </dom-module>
\ No newline at end of file
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html"> <link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html"> <link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html">
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
<dom-module id="add-printer-discovery-dialog"> <dom-module id="add-printer-discovery-dialog">
<template> <template>
<style include="cups-printer-shared"> <style include="cr-shared-style cups-printer-shared">
add-printer-list { add-printer-list {
max-height: 310px; max-height: 310px;
overflow-y: auto; overflow-y: auto;
...@@ -101,7 +102,9 @@ ...@@ -101,7 +102,9 @@
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
<div id="printerProtocol" class="label">$i18n{printerProtocol}</div> <div id="printerProtocol" class="cr-form-field-label">
$i18n{printerProtocol}
</div>
<div class="secondary"> <div class="secondary">
<select class="md-select" aria-labelledby="printerProtocol" <select class="md-select" aria-labelledby="printerProtocol"
value="[[newPrinter.printerProtocol]]" value="[[newPrinter.printerProtocol]]"
...@@ -186,7 +189,7 @@ ...@@ -186,7 +189,7 @@
value="{{activePrinter.ppdModel}}"> value="{{activePrinter.ppdModel}}">
</cr-searchable-drop-down> </cr-searchable-drop-down>
</div> </div>
<div id="ppdLabel" class="field-label"> <div id="ppdLabel" class="cr-form-field-label">
<span>$i18n{selectDriver}</span> <span>$i18n{selectDriver}</span>
<a href="$i18n{printingCUPSPrintPpdLearnMoreUrl}" target="_blank"> <a href="$i18n{printingCUPSPrintPpdLearnMoreUrl}" target="_blank">
$i18n{learnMore} $i18n{learnMore}
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.html"> <link rel="import" href="chrome://resources/cr_elements/cr_scrollable_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html"> <link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/html/chromeos/onc_mojo.html"> <link rel="import" href="chrome://resources/html/chromeos/onc_mojo.html">
<link rel="import" href="../i18n_setup.html"> <link rel="import" href="../i18n_setup.html">
<link rel="import" href="cups_add_printer_dialog_elements.html"> <link rel="import" href="cups_add_printer_dialog_elements.html">
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
<dom-module id="settings-cups-edit-printer-dialog"> <dom-module id="settings-cups-edit-printer-dialog">
<template> <template>
<style include="cups-printer-shared"></style> <style include="cr-shared-style cups-printer-shared"></style>
<add-printer-dialog> <add-printer-dialog>
<div slot="dialog-title">$i18n{editPrinterDialogTitle} <div slot="dialog-title">$i18n{editPrinterDialogTitle}
<div id="general-error-container" hidden="[[!errorText_]]"> <div id="general-error-container" hidden="[[!errorText_]]">
...@@ -49,7 +50,9 @@ ...@@ -49,7 +50,9 @@
</div> </div>
<div class="settings-box two-line"> <div class="settings-box two-line">
<div class="start"> <div class="start">
<div id="printerProtocol" class="label">$i18n{printerProtocol}</div> <div id="printerProtocol" class="cr-form-field-label">
$i18n{printerProtocol}
</div>
<div class="secondary"> <div class="secondary">
<select class="md-select" aria-labelledby="printerProtocol" <select class="md-select" aria-labelledby="printerProtocol"
value="[[pendingPrinter_.printerProtocol]]" value="[[pendingPrinter_.printerProtocol]]"
...@@ -114,7 +117,7 @@ ...@@ -114,7 +117,7 @@
readonly="[[!isOnline_]]"> readonly="[[!isOnline_]]">
</cr-searchable-drop-down> </cr-searchable-drop-down>
</div> </div>
<div id="ppdLabel" class="field-label"> <div id="ppdLabel" class="cr-form-field-label">
<span>$i18n{selectDriver}</span> <span>$i18n{selectDriver}</span>
<a href="$i18n{printingCUPSPrintPpdLearnMoreUrl}" target="_blank"> <a href="$i18n{printingCUPSPrintPpdLearnMoreUrl}" target="_blank">
$i18n{learnMore} $i18n{learnMore}
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
align-items: flex-start; align-items: flex-start;
} }
[slot='dialog-body'] .settings-box .start .label {
@apply --cr-form-field-label;
}
[slot='dialog-body'] .settings-box cr-input { [slot='dialog-body'] .settings-box cr-input {
width: 100%; width: 100%;
} }
...@@ -94,9 +90,8 @@ ...@@ -94,9 +90,8 @@
font: inherit; font: inherit;
} }
.field-label { #ppdLabel {
padding-inline-start: 20px; padding-inline-start: 20px;
@apply --cr-form-field-label;
} }
#general-error-container { #general-error-container {
......
...@@ -146,7 +146,7 @@ suite('cr-input', function() { ...@@ -146,7 +146,7 @@ suite('cr-input', function() {
assertEquals('none', getComputedStyle(crInput.$.label).display); assertEquals('none', getComputedStyle(crInput.$.label).display);
crInput.label = 'foobar'; crInput.label = 'foobar';
assertEquals('block', getComputedStyle(crInput.$.label).display); assertEquals('block', getComputedStyle(crInput.$.label).display);
assertEquals('foobar', label.textContent); assertEquals('foobar', label.textContent.trim());
}); });
test('valueSetCorrectly', function() { test('valueSetCorrectly', function() {
......
...@@ -38,7 +38,7 @@ suite('SettingsTextarea', function() { ...@@ -38,7 +38,7 @@ suite('SettingsTextarea', function() {
assertTrue(label.hidden); assertTrue(label.hidden);
settingsTextarea.label = 'foobar'; settingsTextarea.label = 'foobar';
assertFalse(label.hidden); assertFalse(label.hidden);
assertEquals('foobar', label.textContent); assertEquals('foobar', label.textContent.trim());
assertEquals('foobar', textarea.getAttribute('aria-label')); assertEquals('foobar', textarea.getAttribute('aria-label'));
}); });
......
...@@ -11,20 +11,17 @@ ...@@ -11,20 +11,17 @@
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html"> <link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<dom-module id="files-format-dialog"> <dom-module id="files-format-dialog">
<template> <template>
<style include="md-select"> <style include="cr-shared-style md-select">
.md-select { .md-select {
width: 100%; width: 100%;
} }
.label {
@apply --cr-form-field-label;
}
[slot='body'] > div { [slot='body'] > div {
margin-bottom: var(--cr-form-field-bottom-spacing); margin-bottom: var(--cr-form-field-bottom-spacing);
} }
...@@ -57,9 +54,9 @@ ...@@ -57,9 +54,9 @@
id="label" value="{{label_}}" auto-validate="true"> id="label" value="{{label_}}" auto-validate="true">
</cr-input> </cr-input>
<div id="disk-format"> <div id="disk-format">
<div id="format-type-label" class="label"> <label id="format-type-label" class="cr-form-field-label">
[[i18n('FORMAT_DIALOG_FORMAT_LABEL')]] [[i18n('FORMAT_DIALOG_FORMAT_LABEL')]]
</div> </label>
<select class="md-select" aria-labelledby="format-type-label" <select class="md-select" aria-labelledby="format-type-label"
value="{{formatType_::change}}"> value="{{formatType_::change}}">
<option value="vfat">FAT32</option> <option value="vfat">FAT32</option>
......
...@@ -4,22 +4,19 @@ ...@@ -4,22 +4,19 @@
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network_indicator.html"> <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network_indicator.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_tooltip_icon.html"> <link rel="import" href="chrome://resources/cr_elements/policy/cr_tooltip_icon.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html"> <link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
<link rel="import" href="network_config_element_behavior.html"> <link rel="import" href="network_config_element_behavior.html">
<link rel="import" href="network_shared_css.html"> <link rel="import" href="network_shared_css.html">
<dom-module id="network-config-select"> <dom-module id="network-config-select">
<template> <template>
<style include="network-shared md-select"> <style include="cr-shared-style network-shared md-select">
.md-select { .md-select {
color: var(--cr-primary-text-color); color: var(--cr-primary-text-color);
width: 100%; width: 100%;
} }
#label {
@apply --cr-form-field-label;
}
#outer { #outer {
align-items: stretch; align-items: stretch;
display: flex; display: flex;
...@@ -41,7 +38,7 @@ ...@@ -41,7 +38,7 @@
</style> </style>
<div id="outer"> <div id="outer">
<div id="label">[[label]]</div> <div id="label" class="cr-form-field-label">[[label]]</div>
<div id="inner"> <div id="inner">
<select class="md-select" <select class="md-select"
disabled="[[getDisabled_(disabled, property)]]" disabled="[[getDisabled_(disabled, property)]]"
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html">
<link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html"> <link rel="import" href="chrome://resources/cr_elements/cr_searchable_drop_down/cr_searchable_drop_down.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/md_select_css.html"> <link rel="import" href="chrome://resources/cr_elements/md_select_css.html">
...@@ -15,7 +16,7 @@ ...@@ -15,7 +16,7 @@
<dom-module id="add-smb-share-dialog"> <dom-module id="add-smb-share-dialog">
<template> <template>
<style include="md-select"> <style include="cr-shared-style md-select">
#dialog [slot=body] { #dialog [slot=body] {
height: 440px; height: 440px;
} }
...@@ -24,10 +25,6 @@ ...@@ -24,10 +25,6 @@
width: 100%; width: 100%;
} }
.label {
@apply --cr-form-field-label;
}
cr-searchable-drop-down { cr-searchable-drop-down {
display: block; display: block;
} }
...@@ -86,9 +83,9 @@ ...@@ -86,9 +83,9 @@
value="{{mountName_}}" maxlength="64"> value="{{mountName_}}" maxlength="64">
</cr-input> </cr-input>
<div id="authentication-method" hidden="[[!isActiveDirectory_]]"> <div id="authentication-method" hidden="[[!isActiveDirectory_]]">
<div id="authentication-label" class="label"> <label id="authentication-label" class="cr-form-field-label">
[[i18n('smbShareAuthenticationMethod')]] [[i18n('smbShareAuthenticationMethod')]]
</div> </label>
<select class="md-select" aria-labelledby="authentication-label" <select class="md-select" aria-labelledby="authentication-label"
value="{{authenticationMethod_::change}}"> value="{{authenticationMethod_::change}}">
<option value="kerberos"> <option value="kerberos">
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<link rel="import" href="../../html/assert.html"> <link rel="import" href="../../html/assert.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html">
<link rel="import" href="../hidden_style_css.html"> <link rel="import" href="../hidden_style_css.html">
<link rel="import" href="../shared_style_css.html">
<link rel="import" href="../shared_vars_css.html"> <link rel="import" href="../shared_vars_css.html">
<link rel="import" href="cr_input_style_css.html"> <link rel="import" href="cr_input_style_css.html">
<dom-module id="cr-input"> <dom-module id="cr-input">
<template> <template>
<style include="cr-hidden-style cr-input-style"> <style include="cr-hidden-style cr-input-style cr-shared-style">
/* /*
A 'suffix' element will be outside the underlined space, while a A 'suffix' element will be outside the underlined space, while a
'prefix' element will be inside the underlined space by default. 'prefix' element will be inside the underlined space by default.
...@@ -103,7 +104,10 @@ ...@@ -103,7 +104,10 @@
-webkit-appearance: none; -webkit-appearance: none;
} }
</style> </style>
<div id="label" hidden="[[!label]]" aria-hidden="true">[[label]]</div> <div id="label" class="cr-form-field-label" hidden="[[!label]]"
aria-hidden="true">
[[label]]
</div>
<div id="row-container" part="row-container"> <div id="row-container" part="row-container">
<div id="input-container"> <div id="input-container">
<div id="inner-input-container"> <div id="inner-input-container">
......
...@@ -27,11 +27,6 @@ ...@@ -27,11 +27,6 @@
} }
} }
/* Label styling below. */
#label {
@apply --cr-form-field-label;
}
:host([focused_]:not([readonly]):not([invalid])) #label { :host([focused_]:not([readonly]):not([invalid])) #label {
color: var(--cr-input-focus-color); color: var(--cr-input-focus-color);
} }
......
...@@ -100,6 +100,16 @@ ...@@ -100,6 +100,16 @@
#cr-container-shadow-bottom.has-shadow { #cr-container-shadow-bottom.has-shadow {
opacity: var(--cr-container-shadow-max-opacity); opacity: var(--cr-container-shadow-max-opacity);
} }
.cr-form-field-label {
color: var(--cr-form-field-label-color);
display: block;
font-size: var(--cr-form-field-label-font-size);
font-weight: 500;
letter-spacing: .4px;
line-height: var(--cr-form-field-label-line-height);
margin-bottom: 8px;
}
</style> </style>
</template> </template>
</dom-module> </dom-module>
...@@ -245,15 +245,6 @@ ...@@ -245,15 +245,6 @@
--cr-form-field-label-font-size: .625rem; --cr-form-field-label-font-size: .625rem;
--cr-form-field-label-height: 1em; --cr-form-field-label-height: 1em;
--cr-form-field-label-line-height: 1em; --cr-form-field-label-line-height: 1em;
--cr-form-field-label: {
color: var(--cr-form-field-label-color);
display: block;
font-size: var(--cr-form-field-label-font-size);
font-weight: 500;
letter-spacing: .4px;
line-height: var(--cr-form-field-label-line-height);
margin-bottom: 8px;
}
} }
</style> </style>
</custom-style> </custom-style>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment