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

Трушков Валерий #50

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/cat1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat10.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat6.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cat9.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
174 changes: 174 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
input[name='style-switcher']:checked ~ .products .products-item
{
display: block;
width: 95%;
}

input[name='style-switcher']:checked ~ .products .products-item-image,
input[name='style-switcher']:checked ~ .products .products-item-info,
input[name='style-switcher']:checked ~ .products .products-item-description,
.products-item
{
display: inline-block;
vertical-align: top;
}

input[name='style-switcher']:checked ~ .products .products-item-image
{
width: 20%;
margin-right: 2%;
}

input[name='style-switcher']:checked ~ .products .products-item-info
{
margin-right: 2%;
width: 30%;
max-width: 250px;
}

input[name='style-switcher']:checked ~ .products .products-item-description
{
width: 30%;
}

.m-y-1
{
margin-top: 5px;
margin-bottom: 5px;
}

.products
{
font-size: 0;
}

.products-item
{
font-size: 16px;
margin: 1%;
width: 28.5%;
border: 1px solid transparent;
padding: 1%;
}

.products-item:hover
{
border-color: #000;
}

.products-item-image
{
width: 100%;
height: auto;
}

.products-item-info .title a
{
font-size: 21px;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.products-item-info .categories
{
padding: 0;
color: #555;
}

.products-item-info .categories li
{
list-style: none;
display: inline-block;
}

.products-item-info .categories li + li:before
{
content: '-';
margin-right: 3px;
}

.products-item-info .price
{
clear: both;
}

.products-item-info .price .current-price
{
color: #d60004;
font-size: 21px;
}

.products-item-info .price .old-price
{
color: #555;
text-decoration: line-through;
margin-left: 5px;
}

.rank
{
float: left;
display: block;
direction: rtl;
}

.rank legend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем нужен этот стиль? Нужно ответить, а не убрать эту строчку

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужен он тут вовсе. легенда была, но ее не стало, а стили остались

{
overflow: hidden;
height: 0;
}

.rank input
{
position: absolute;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем нужен position: absolute?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лишний

display: none;
}

.rank label
{
color: #ddd;
}

.rank label:before
{
content: '★';
float: right;
overflow: hidden;
white-space: nowrap;
cursor: pointer;
}

.rank input:checked ~ label
{
color: #ff8f1f;
}

.rank label:hover,
.rank label:hover ~ label
{
color: #ffdcbd;
}

.rank input:checked + label:hover,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Откуда взял это решение?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css-tricks

.rank input:checked + label:hover ~ label,
.rank input:checked ~ label:hover,
.rank input:checked ~ label:hover ~ label,
.rank label:hover ~ input:checked ~ label
{
color: #ffc08a;
}

a:hover
{
color: #f00;
}

@media only screen and (min-width: 768px)
{
.products-item
{
width: 20.5%;
}
}
Loading