Files
notifications-admin/app/assets/stylesheets/components/textbox.scss
Chris Hill-Scott a7db2f032a Use tabular font for numeric fields
When you’re entering numbers into a field we already add some extra
tracking to make it easier to read.

With this extra tracking the kerning looks a bit more even with the
tabular, not lining numbers. This makes sense because tabular numbers
are designed to be used where the content is numeric-only. Lining
numbers (the default) are more appropriate for numbers that are used in
passages of text.
2019-03-01 11:36:56 +00:00

76 lines
1.2 KiB
SCSS

.textbox-highlight {
$tag-background: rgba($light-blue, 0.6);
&-wrapper {
position: relative;
}
&-textbox {
resize: none;
z-index: 20;
background: none;
}
&-textbox,
&-background,
&-foreground,
&-mask {
font-size: 19px;
display: block;
box-sizing: border-box;
position: relative;
margin: 0;
padding: 4px;
overflow: hidden;
line-height: 1.6;
}
&-background {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
color: transparent;
white-space: pre-wrap;
overflow-wrap: break-word;
word-wrap: break-word;
border: 2px solid transparent;
padding-bottom: $gutter-half;
z-index: 10;
.placeholder {
color: transparent;
}
}
}
.textbox-help-link {
margin: 10px 0 0 0;
}
.textbox-right-aligned {
text-align: right;
}
.extra-tracking .form-control {
@include core-19($tabular-numbers: true);
padding-left: 5px;
letter-spacing: 0.04em;
}
.textbox-colour-preview {
@include media(desktop) {
width: 38px;
height: 38px;
margin-left: 5px;
border-radius: 50%;
box-shadow: inset 0 0 0 1px rgba($black, 0.2);
display: inline-block;
vertical-align: top;
transition: background 0.3s ease-out;
}
}