Skip to content

Commit

Permalink
Update styles for field, inherited by label
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jan 29, 2019
1 parent df39db1 commit 1fa65d2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions theme/lumo/vaadin-custom-field-styles.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
<link rel="import" href="../../../vaadin-lumo-styles/color.html">
<link rel="import" href="../../../vaadin-lumo-styles/sizing.html">
<link rel="import" href="../../../vaadin-lumo-styles/spacing.html">
<link rel="import" href="../../../vaadin-lumo-styles/typography.html">
<link rel="import" href="../../../vaadin-lumo-styles/mixins/required-field.html">

<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
<template>
<style include="lumo-required-field">
:host {
color: var(--lumo-body-text-color);
font-size: var(--lumo-font-size-m);
font-family: var(--lumo-font-family);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: transparent;
padding: var(--lumo-space-xs) 0;
}

:host(:not([has-label])) [part="label"]::after {
display: none;
}
Expand Down
11 changes: 11 additions & 0 deletions theme/material/vaadin-custom-field-styles.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<link rel="import" href="../../../vaadin-material-styles/color.html">
<link rel="import" href="../../../vaadin-material-styles/typography.html">
<link rel="import" href="../../../vaadin-material-styles/mixins/required-field.html">

<dom-module id="material-custom-field" theme-for="vaadin-custom-field">
<template>
<style include="material-required-field">
:host {
outline: none;
color: var(--material-body-text-color);
font-size: var(--material-body-font-size);
font-family: var(--material-font-family);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

[part="label"] {
position: relative;
top: 0;
Expand Down

0 comments on commit 1fa65d2

Please sign in to comment.