18F/State-TalentMAP

View on GitHub
src/sass/_results.scss

Summary

Maintainability
Test Coverage
$filter-container-width: 23%;
$results-container-width: 100% - $filter-container-width;
 
.results {
label {
font-size: .9em;
}
 
.results-dropdown-page-size {
float: left;
margin-left: 20px;
 
select {
width: 80px;
}
}
 
.results-dropdown-sort {
float: left;
margin-left: 10px;
}
 
.no-results {
margin-top: 20px;
width: 350px;
}
}
 
.results-loading {
opacity: .5;
pointer-events: none;
}
 
.results-card-padded-section {
padding-right: 20%;
}
 
.results-card {
background-color: $color-white;
border: 1px solid $results-card-border;
border-left: 8px solid $results-card-accent;
margin-bottom: 2rem;
padding: 1.1rem;
 
.bid-count-container {
font-size: .95em;
 
.bid-count-label {
font-weight: normal;
padding-top: .4em;
}
}
 
.header {
margin-bottom: 1rem;
margin-top: .2rem;
 
h3,
dt,
dd {
font-family: 'Roboto';
font-size: 1.6rem;
margin-bottom: 0;
margin-top: 0;
}
 
h3,
dt {
font-weight: 500;
}
}
 
.footer {
margin-bottom: rem(14px);
margin-top: rem(14px);
padding-top: rem(4px);
 
$section-height: 38px;
 
section {
display: inline-block;
min-height: $section-height;
position: relative;
vertical-align: middle;
}
 
$button-gutter: 6px;
$button-offset: $button-gutter / 2;
 
section:nth-child(1) {
padding-left: $button-offset;
padding-right: $button-offset;
 
.tm-button,
.usa-button,
.compare-check-box-container {
display: inline-block;
margin: 0;
margin-bottom: 5px;
position: relative;
width: 37%;
 
&:not(last-child) {
margin-right: 15px;
}
 
@media screen and (max-width: $screen-sm-min) {
position: static;
width: 100%;
}
}
 
.usa-button {
width: auto;
}
 
.tm-button {
font-size: rem(14px);
padding: 12px 15px;
width: auto;
}
 
.compare-check-box-container {
border: 1px solid $color-black;
border-radius: 5px;
font-size: rem(14px);
line-height: 39px;
text-align: center;
 
// scss-lint:disable NestingDepth SelectorDepth
.fa {
left: -2px;
position: relative;
}
// scss-lint:enable NestingDepth SelectorDepth
}
 
.fa {
position: relative;
}
 
@media screen and (max-width: $screen-sm-min) {
.usa-button {
margin-bottom: .5em;
}
 
.compare-check-box-container {
padding-left: 0;
text-align: center;
}
}
}
 
section:nth-child(2) {
> div {
position: absolute;
top: 50%;
transform: translateY(-50%);
 
@media screen and (max-width: $screen-sm-max) {
left: 24px;
}
}
}
 
// Divider Accent
.divider {
&::after {
background-color: $bg-gray-dark-1;
content: '';
display: block;
height: 100%;
position: absolute;
right: -(8px + (8px - $button-gutter));
top: 0;
width: 1px;
}
}
 
.usa-button:not(.favorite-container) {
font-size: 1.4rem;
font-weight: 400;
line-height: em(15px);
 
.fa,
.ds-c-spinner {
margin: 0;
position: relative;
width: em(14px);
}
 
@media screen and (max-width: $screen-md-max) {
padding-left: 1rem;
right: 1rem;
}
}
 
.favorite-container {
border: 1px solid $color-black;
box-shadow: none;
float: none;
}
 
$button-box-shadow: inset 0 0 0 1px;
 
.usa-button-secondary:not(.favorite-container) {
box-shadow: $button-box-shadow $bg-gray-dark-1;
color: $primary-base;
 
&:hover {
box-shadow: $button-box-shadow $primary-blue-darker;
color: $primary-blue-darker;
}
 
&:disabled,
&:disabled:active,
&:disabled:hover,
&:disabled:focus, {
box-shadow: $button-box-shadow $bg-gray-dark-3;
color: $bg-gray-dark-3;
 
}
 
&.usa-button-active,
&.usa-button-active:hover {
box-shadow: $button-box-shadow $primary-blue-darkest;
color: $primary-blue-darkest;
}
 
.fa {
top: 1px;
}
}
 
dt,
dd {
font-family: 'Roboto';
font-size: rem(12px);
line-height: rem(14px);
}
}
 
Merge rule `.bid-count-container` with rule on line 45
.bid-count-container {
float: right;
}
 
.section-title {
font-size: .9em;
margin-bottom: .6em;
text-transform: uppercase;
}
 
.section-data-points {
font-size: .9em;
}
 
.bottom-section {
float: left;
margin-top: 1em;
 
.details-button-container {
float: left;
}
 
.details-button {
font-size: .9em;
}
 
.bid-cycle-container {
font-size: .8em;
}
 
.bid-cycle-container-section {
float: left;
}
 
.bid-cycle-container-section:first-child {
border-right: 1px solid $color-black;
margin-right: 5px;
padding-right: 5px;
}
 
.compare-check {
float: left;
font-size: .9em;
margin: 15px;
}
}
}
 
.top-nav {
.reset-compare-link {
float: left;
padding: 15px;
 
a {
cursor: pointer;
}
}
 
.comparisons-button {
float: left;
padding: 15px 0;
text-align: center;
}
}
 
.filter-container {
float: left;
font-size: .9em;
height: auto;
margin-right: 0;
padding: 0 10px 15px;
width: $filter-container-width;
 
[type=checkbox],
[type=radio] {
box-sizing: border-box;
margin: 0;
margin-left: 0;
opacity: 0;
padding: 0;
position: fixed;
}
 
label {
margin-top: 1rem;
}
 
.reset-filters {
color: $blue-primary;
cursor: pointer;
font-weight: bold;
 
.fa {
color: $color-red;
float: left;
margin: 2px 5px 0 0;
}
}
 
@media screen and (max-width: $screen-md-min) {
border: 1px solid $tm-navy-dark;
height: 100px;
margin-bottom: 10px;
overflow-y: scroll;
padding: 15px 10px;
width: 100%;
 
.filter-container-bottom {
margin: 15px 0;
}
}
 
.filter-container-top {
color: $color-gray-darkest;
margin-bottom: .5em;
}
 
.filter-container-bottom {
color: $color-gray-darkest;
margin: 0 0 15px;
}
 
.filter-control-container {
padding: 0 0 10px 1px;
}
 
.filter-control-left {
float: left;
width: 50%;
}
 
.filter-control-right {
float: left;
width: 50%;
 
span {
float: right;
}
}
 
.term-title {
border-bottom: 1px solid $color-gray-light;
font-weight: bold;
margin-top: 1em;
}
 
.term-group-first {
.term-title {
margin-top: 0;
}
}
}
 
.results-container {
float: left;
padding-left: 30px;
width: $results-container-width;
 
.selections-container,
.pill-list-container {
display: inline;
}
 
.selections-container {
margin-right: .7em;
}
 
@media screen and (max-width: $screen-md-min) {
padding-left: 0;
width: 100%;
}
 
.favorite-container {
line-height: 20px;
text-align: center;
}
 
.results-controls {
@media screen and (max-width: $screen-md-min) {
padding: 0 15px;
}
}
 
.total-results {
float: left;
margin-top: 10px;
}
 
.drop-downs {
float: right;
margin-top: 4px;
}
 
.dropdowns-container {
float: right;
}
}
 
.results-list-container {
margin: 0 0 1em;
position: relative;
}
 
.results-section-container {
max-width: 1140px;
}
 
.search-filters-container {
.boolean-filter-container {
margin-left: 10px;
padding-top: 10px;
 
label {
font-size: 1em;
margin-top: 10px;
}
}
 
.tm-checkbox {
width: 100%;
}
 
[type=checkbox]:focus + label::before {
outline: $tm-focus-outline-default;
}
 
fieldset {
margin: 0 0 10px;
}
 
legend {
font-size: 1em;
}
 
.usa-accordion:not(:last-child) > li {
margin-bottom: 1rem;
}
 
.usa-accordion-button {
background-color: $bg-blue-dark-1;
color: $color-white;
font-weight: normal;
padding: .7em;
}
 
.usa-accordion-content {
background-color: $color-gray-lightest-alt;
color: $color-black;
font-size: 1.1em;
max-height: 550px;
overflow-y: auto;
padding: 1rem;
}
 
.accordion-checkbox-post,
.accordion-checkbox-skill-cone-code {
.usa-accordion-button {
float: left;
padding-left: 0;
width: 84%;
}
 
// target the first checkbox and not the child ones
.accordion-content-small > .tm-checkbox {
float: left;
margin: 0 6% 0 5%;
width: 5%;
}
}
 
.accordion-checkbox-post {
min-height: 220px;
}
 
.accordion-checkbox-skill-cone-code,
.accordion-checkbox-post,
.accordion-checkbox-bureau {
padding: 0;
 
.tm-nested-accordions {
padding-bottom: .5em;
padding-top: .5em;
}
 
.post-auto-suggest-container {
padding: .5em;
}
}
 
.accordion-checkbox-grade {
.tm-checkbox {
float: left;
}
}
}
 
.language-view-all {
font-size: .8em;
padding: .4em;
}
 
.accordion-checkbox-language {
.usa-accordion-content {
background-color: $color-white;
color: $color-black;
}
 
.language-accordion-item {
background-color: $color-white;
color: $color-black;
}
 
}
 
.save-new-search-container {
background-color: $blue-primary-light;
margin: 10px 0 26px;
padding: 10px;
 
.fa {
margin-right: 10px;
}
 
.save-search-link {
color: $blue-primary;
cursor: pointer;
text-decoration: underline;
}
 
.usa-input-error {
border-left: unset;
margin-top: unset;
padding-bottom: unset;
padding-left: unset;
padding-top: unset;
position: unset;
right: unset;
 
input {
width: 100%;
}
}
 
.saved-search-form {
margin-top: 10px;
}
 
.saved-search-form-buttons {
float: left;
margin-top: 5px;
 
button {
margin: 18px 0 0 10px;
 
&:first-child {
margin-left: 0;
}
}
}
 
.saved-search-form-primary-button,
.saved-search-form-secondary-button {
box-shadow: inset 0 0 0 1px $primary-blue;
float: left;
padding: 1rem 2rem;
 
// Overrides for box-shadow length
&:hover {
box-shadow: inset 0 0 0 1px $primary-blue-darker;
}
 
&:focus {
box-shadow: inset 0 0 0 1px $color-black;
}
}
}
 
.saved-search-alert {
margin: 0 0 10px;
}
 
.compare-check-box-container {
cursor: pointer;
}
 
.loading-message {
text-align: center;
}
 
.pill {
border-radius: 12px;
font-size: .8em;
padding: .5em;
}
 
.favorite-container {
cursor: pointer;
float: right;
}
 
.mission-accordion {
.usa-accordion-content {
padding: 1rem 1rem 1rem .5rem;
}
}
 
.render-suggestion {
color: $color-black;
}
 
.results-dropdown {
// dropdown labels should appear to the left of the input
label {
float: left;
font-size: .8em;
margin-right: 10px;
margin-top: 6px;
}
 
select {
background-color: $color-white;
border: 1px solid $color-gray-light;
border-radius: 3px;
font-size: .8em;
height: 28px;
overflow: hidden;
padding: 0 1.5em 0 .7em;
text-overflow: ellipsis;
white-space: nowrap;
width: 130px;
}
}
 
.results-viewby-container {
float: right;
 
.is-not-selected {
.fa {
color: $color-gray-light;
}
}
 
.is-selected {
.fa {
color: $color-black;
}
}
 
@media screen and (max-width: $screen-md-min) {
float: left;
}
 
.view-icon {
float: left;
padding: 5px 10px 0;
}
 
.view-icon-border {
border-left: solid 1px $color-gray-light;
}
 
.view-label {
float: left;
font-size: .8em;
padding: 7px;
}
}