mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-12 14:08:59 +00:00
270 lines
5.1 KiB
SCSS
270 lines
5.1 KiB
SCSS
#components-page {
|
|
.component-search {
|
|
margin-bottom: 24px;
|
|
|
|
input {
|
|
width: 100%;
|
|
padding: 10px;
|
|
|
|
background-color: #fefefe;
|
|
border-radius: 2px;
|
|
border: 1px solid;
|
|
border-color: #7c7c7c #c3c3c3 #ddd;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: $palm-end) {
|
|
#components-page {
|
|
.hass-option-cards {
|
|
.option-card {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: $lap-end) {
|
|
#components-page {
|
|
.filter-button-group {
|
|
margin-bottom: 16px;
|
|
|
|
.btn {
|
|
display: inline-block;
|
|
margin-right: 8px;
|
|
margin-bottom: 8px;
|
|
|
|
&.current {
|
|
background-color: #3a5561;
|
|
background-image: linear-gradient(to bottom, #3a5561, #3f6b7d);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (min-width: $desk-start) {
|
|
#components-page {
|
|
.filter-button-group {
|
|
.active {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.featured {
|
|
margin: 12px 0;
|
|
}
|
|
|
|
.version_select {
|
|
margin: 12px 0 12px 0;
|
|
}
|
|
|
|
.version_select > select {
|
|
width: 100%;
|
|
}
|
|
|
|
.btn {
|
|
display: block;
|
|
background: 0;
|
|
color: black;
|
|
box-shadow: none;
|
|
text-shadow: none;
|
|
padding: 2px;
|
|
|
|
&.current {
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// styles for the cards
|
|
.hass-option-cards {
|
|
display: -ms-flexbox;
|
|
display: -webkit-box;
|
|
display: -webkit-flexbox;
|
|
display: -webkit-flex;
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-start;
|
|
align-items: flex-start;
|
|
margin: -4px; // grid trick, has to match option-card's margin
|
|
|
|
p.note {
|
|
width: 100%;
|
|
}
|
|
|
|
.option-card {
|
|
flex: 0 0 auto;
|
|
width: 210px;
|
|
height: 142px;
|
|
display: inline-block;
|
|
background-color: #fefefe;
|
|
margin: 4px;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(0, 0, 0, .12);
|
|
box-shadow: rgba(0,0,0,0.06) 0 0 10px;
|
|
padding: 8px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
|
|
.img-container {
|
|
height: 50px;
|
|
margin: 12px 0;
|
|
font: 0/0 a;
|
|
|
|
&:before {
|
|
/* create a full-height inline block pseudo=element */
|
|
content: " ";
|
|
display: inline-block;
|
|
vertical-align: middle; /* vertical alignment of the inline element */
|
|
height: 100%;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
max-height: 50px;
|
|
box-shadow: none;
|
|
border: none;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
|
|
text-decoration: none;
|
|
font-size: 18px;
|
|
color: #000;
|
|
line-height: 1.3em;
|
|
height: 2.6em;
|
|
margin-top: 20px;
|
|
}
|
|
}
|
|
|
|
// fade-in animation
|
|
&.show-items .option-card {
|
|
opacity: 0;
|
|
-webkit-animation: new-item-animation 0.2s linear forwards;
|
|
-o-animation: new-item-animation 0.2s linear forwards;
|
|
animation: new-item-animation 0.2s linear forwards;
|
|
}
|
|
|
|
// fade-out animation
|
|
&.remove-items .option-card {
|
|
-webkit-animation: removed-item-animation 0.2s
|
|
cubic-bezier(0.55, -0.04, 0.91, 0.94) forwards;
|
|
-o-animation: removed-item-animation 0.2s
|
|
cubic-bezier(0.55, -0.04, 0.91, 0.94) forwards;
|
|
animation: removed-item-animation 0.2s cubic-bezier(0.55, -0.04, 0.91, 0.94)
|
|
forwards;
|
|
}
|
|
}
|
|
|
|
// animations for fade-in and fade-out effects of option-cards
|
|
@keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
-webkit-transform: scale(0);
|
|
-ms-transform: scale(0);
|
|
-o-transform: scale(0);
|
|
transform: scale(0);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
-ms-transform: scale(1);
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@-webkit-keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
-webkit-transform: scale(0);
|
|
transform: scale(0);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
@-o-keyframes new-item-animation {
|
|
from {
|
|
opacity: 0;
|
|
-o-transform: scale(0);
|
|
transform: scale(0);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
// space blocker animation
|
|
@keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
@-webkit-keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
@-o-keyframes openspace {
|
|
to {
|
|
height: auto;
|
|
}
|
|
}
|
|
|
|
// removal animation
|
|
@keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
-ms-transform: scale(1);
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
-webkit-transform: scale(0);
|
|
-ms-transform: scale(0);
|
|
-o-transform: scale(0);
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@-webkit-keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-webkit-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
-webkit-transform: scale(0);
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
@-o-keyframes removed-item-animation {
|
|
from {
|
|
opacity: 1;
|
|
-o-transform: scale(1);
|
|
transform: scale(1);
|
|
}
|
|
to {
|
|
-o-transform: scale(0);
|
|
transform: scale(0);
|
|
opacity: 0;
|
|
}
|
|
}
|