@findify/react-components
Version:
Findify react UI components
150 lines (133 loc) • 2.45 kB
CSS
$text-align-vertical: center;
$text-align-horizontal: left;
.root {
width: 100%;
height: 100%;
background-color: transparent;
transition: background-color 0.35s ease-in-out;
box-sizing: border-box;
display: flex;
position: relative;
&.vertical {
text-align: $text-align-vertical;
flex-direction: column;
padding-bottom: 50px;
}
&.horizontal {
text-align: $text-align-horizontal;
flex-direction: row;
padding-bottom: 15px;
}
&.autocomplete {
padding-bottom: 0;
}
&.highlighted,
&:focus-within {
&:after {
content: ' ';
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
border: 2px solid Highlight;
border-color: -webkit-focus-ring-color;
}
a:focus {
text-decoration: none;
}
}
}
.content {
display: flex;
flex-direction: column;
height: 100%;
flex: 1 1 auto;
}
.image {
cursor: pointer;
margin-bottom: 12px;
order: -1;
.horizontal & {
min-width: 60px;
margin: 0 16px 0 0;
}
}
.divider {
flex: 1 0 auto;
}
.content {
font-size: 14px;
}
.title {
$font-size: 1;
$font-family: $font-base;
$text-transform: none;
color: $color;
font-family: $font-family;
text-transform: $text-transform;
font-size: calc(
$font-size-medium * $font-size
) ; /* FIXME: figure out issue with import order of styles */
line-height: calc($font-size-medium * $font-size * 1.6);
margin: 0;
padding: 0;
width: 100%;
}
.title-link {
color: currentColor;
text-decoration: none;
&:after {
content: ' ';
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 1;
}
&:focus {
text-decoration: underline;
}
}
.description {
$font-size: 1;
$color: #b2b2b2;
$font-family: $font-base;
font-family: $font-family;
font-size: calc($font-size-medium * $font-size);
color: $color;
margin: 5px 0;
}
.rating {
margin: 5px 0;
margin-bottom: 8px;
width: 100%;
text-align: center;
}
.color {
text-transform: none;
font-size: 13px;
color: #b2b2b2;
margin: 5px 0;
}
.out-of-stock {
margin: 0;
margin-top: -3px;
font-size: 13px;
color: #b2b2b2;
}
.discount-sticker {
position: absolute;
top: 4%;
right: 4%;
z-index: 50;
}
.variants {
color: $color-grey-3;
font-family: $font-base;
font-size: $font-size-large;
margin-top: 10px;
margin-bottom: 10px;
text-align: center;
}