Files
threshold-ui/addons/rose/app/styles/rose/components/table/_table.scss
T
Randall Morey b08d3affe4 refactor: 💡 update scope form to use HDS input and textarea (#1459)
* refactor: 💡 update scope form to use HDS input and textarea

* chore: 🤖 tweak "optional" label text color in dark mode

* fix: 🐛 add HDS field margins and fix form tests

* fix: 🐛 fix acceptance tests and add TextInput event handlers

* fix: 🐛 use input event and fix set-from-event to handle empty

* fix: 🐛 fix linting and add @type='text' on HDS text input

* fix: 🐛 fix HDS field margin overrides

* chore: 🤖 simplify selector
2022-11-15 08:53:10 -08:00

115 lines
2.1 KiB
SCSS

@use '../../variables/sizing';
@use '../../utilities/type';
@use 'sass:math';
.rose-table {
@include type.type(s, normal);
width: 100%;
.rose-table-row {
border-bottom: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3);
text-align: left;
&:last-child {
border-bottom: 0;
}
}
// This styles are add to stop the input to apply extra margin (default on forms)
.rose-form-input,
.rose-form-input-field,
[class^='hds-form-field'],
[class^='hds-form-field']:not(:first-child) {
margin: 0;
width: 100%;
}
// Fix margin issue with textarea elements inside tables
textarea {
display: block;
}
.rose-table-cell,
.rose-table-header-cell {
vertical-align: text-top;
&.align-right {
text-align: right;
}
&.align-center {
text-align: center;
}
}
.rose-table-header-cell {
@include type.type(s, semibold);
}
.rose-table-header .rose-table-header-cell {
color: var(--ui-gray);
}
.rose-table-header,
.rose-table-footer {
.rose-table-cell,
.rose-table-header-cell {
padding: sizing.rems(s);
}
}
.rose-table-body {
.rose-table-cell,
.rose-table-header-cell {
padding: sizing.rems(m) sizing.rems(s);
}
}
.rose-table-cell-shrink {
width: 1%;
white-space: nowrap;
}
[class*='rose-button'] {
margin-bottom: 0;
}
&.rose-table-condensed {
.rose-table-cell,
.rose-table-header-cell {
@include type.type(s);
$line-height: math.div(36, 14);
line-height: $line-height;
padding: sizing.rems(xxs) + sizing.rems(xxxxs) sizing.rems(s);
&:first-child {
padding-left: 0;
}
}
.rose-table-header {
border-bottom: sizing.rems(xxxxs) solid var(--ui-gray-subtler-3);
.rose-table-header-cell {
$line-height: math.div(16, 14);
line-height: $line-height;
padding: sizing.rems(xs) sizing.rems(s);
&:first-child {
padding-left: 0;
}
}
}
}
.rose-table-row-visually-hidden {
position: absolute;
top: -9999rem;
left: -9999rem;
}
}