Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EM-1288: Search Page Styles #117

Merged
merged 14 commits into from
Jul 26, 2017
Merged
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "employer-style-base",
"version": "2.2.14",
"version": "2.2.15",
"author": "[email protected]",
"license": "Apache-2.0",
"description": "A stack-agnostic Sass library providing basic components and typography intended for the Employer experience",
Expand Down
1 change: 1 addition & 0 deletions sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@import "directives/02_base_components/gradients";
@import "directives/02_base_components/groups";
@import "directives/02_base_components/headings";
@import "directives/02_base_components/pagination";
@import "directives/02_base_components/modals";
@import "directives/02_base_components/tabs";
@import "directives/02_base_components/toggles";
Expand Down
2 changes: 1 addition & 1 deletion sass/directives/00_variables/_breakpoints.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ $medium-screen-max: 64em; // (1024px)
$large-screen-min: $medium-screen-max;

// Nav breakpoints
$midrange-nav-max: 56em; // (~880px) Point at which full nav no longer fits in one line
$midrange-nav-max: 66.5em; // (~1060px) Point at which full nav + search no longer fits in one line
$mobile-nav-max: 31em; // (490px) Point at which full nav + collapsed right-side nav no longer fit in one line
2 changes: 2 additions & 0 deletions sass/directives/00_variables/_sizing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ $accordion-angle-size: 35px;
$resource-arrows: 1rem;
$resource-continue-block-size: 40px;
$resource-continue-block-icon: 18.72px;
$search__thumbnail-width: 9.375rem; // 150px
$search__thumbnail-height: 5.3125rem; // 85px
$sitemap-angle-icon: 17px;
$social-media-icons: 19.2px;
$toggle-switch-width: 65px;
Expand Down
16 changes: 9 additions & 7 deletions sass/directives/02_base_components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,13 @@ $massive-button-horizontal-padding: $base-input-font-size * 2;
@mixin text-button {
background-color: $text-button-color;
color: $text-button-text-color;
border-color: $text-button-border-color;
border: 0;
border-radius: 0;
border-bottom: $base-button-border-size--text solid $text-button-border-color;
padding-left: 0;
padding-right: 0;
margin-left: $base-button-horizontal-padding;
margin-right: $base-button-horizontal-padding;
text-transform: uppercase;
white-space: pre-line;

Expand All @@ -207,12 +213,8 @@ $massive-button-horizontal-padding: $base-input-font-size * 2;
&:hover, &:active, &:focus {
background-color: $text-hover-button-color;
color: $text-hover-button-text-color;
border-color: transparent;
border-bottom: $base-button-border-size--text solid $text-hover-button-border-color;
padding-left: 0;
padding-right: 0;
margin-left: $base-button-horizontal-padding;
margin-right: $base-button-horizontal-padding;
border-color: $text-hover-button-border-color;
outline: none;
}

&:disabled, &[disabled]:hover, &[disabled]:active, &.disabled, &.disabled:hover, &.disabled:active {
Expand Down
4 changes: 2 additions & 2 deletions sass/directives/02_base_components/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $select-arrow-width: 3em;

// Autocomplete Dropdown

@mixin autocomplete-dropdown {
@mixin autocomplete-dropdown($list-z-index: 1) {
position: relative;

input[type="search"] {
Expand All @@ -181,7 +181,7 @@ $select-arrow-width: 3em;
position: absolute;
width: 100%;
background-color: white;
z-index: 1;
z-index: $list-z-index;
}

li {
Expand Down
36 changes: 36 additions & 0 deletions sass/directives/02_base_components/_pagination.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@mixin pagination {
&__arrow {
position: relative;
@include text-button;
@include font-style--small-bold;
text-transform: none;

&:after {
font-family: FontAwesome;
position: absolute;
}
}

&__arrow--prev {
&:after {
content: '\f137'; // chevron circle left
right: calc(100% + #{$base-spacing-smallest});
}
}

&__arrow--next {
&:after {
content: '\f138'; // chevron circle right
left: calc(100% + #{$base-spacing-smallest});
}
}

&__arrow + &__arrow:before {
content: '';
position: absolute;
top: $base-button-vertical-padding;
bottom: $base-button-vertical-padding;
left: -$base-button-horizontal-padding;
border-left: $base-border;
}
}
3 changes: 2 additions & 1 deletion sass/directives/02_base_components/_type_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
text-transform: uppercase;
}

@mixin font-style--small-bold { // Style 6: nav dropdowns
@mixin font-style--small-bold { // Style 6: nav dropdowns, pagination
font-size: $font-size-small;
font-weight: $font-weight-bold;
}
Expand Down Expand Up @@ -60,6 +60,7 @@
color: $base-link-color;
text-decoration: none;
font-weight: $font-weight-bold;
cursor: pointer;

&:hover,
&:focus,
Expand Down
70 changes: 70 additions & 0 deletions sass/directives/03_components/_media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,73 @@
}
}
}


// Search Results
@mixin site-search__results__list {

.site-search__results__list-item { // li
list-style-type: none;
border-bottom: $base-border;
padding: $base-spacing-small 0;
}

.site-search__results__item-link { // li a
@include display(flex);

&:hover,
&:active,
&:focus {
text-decoration: none;
}
}

.site-search__results__item-thumb { // div
@include flex-grow(0);
@include flex-shrink(0);
@include flex-basis(auto);
margin-right: $base-spacing-medium;
width: $search__thumbnail-width;
height: $search__thumbnail-height;
text-align: center;
}

.site-search__results__item-image { // div img
height: auto;
width: auto;
max-width: $search__thumbnail-width;
max-height: $search__thumbnail-height;

@supports (object-fit: cover) {
height: 100%;
width: 100%;
max-width: none;
object-fit: cover;
}
}

.site-search__results__item-text { // div
@include flex-grow(1);
@include flex-shrink(1);
@include flex-basis(auto);
}

.site-search__results__item-header { // div h#
font-size: $font-size-med;
font-weight: $font-weight-bold;
color: $base-link-color;
text-transform: none;
margin-bottom: 0;

&:hover,
&:active,
&:focus {
text-decoration: underline;
}
}

.site-search__results__item-description { // div p
@include base-body-copy;
color: $text-color-grey;
}
}