-
Notifications
You must be signed in to change notification settings - Fork 114
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
Стольников Константин #101
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,26 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
div | ||
{ | ||
background-color: #ff6; | ||
} | ||
|
||
div:nth-child(4n-1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Попробуй использовать псевдокласс |
||
{ | ||
background-color: #ffb366; | ||
} | ||
|
||
div:last-child | ||
{ | ||
background-color: #ffb366; | ||
} | ||
|
||
div:first-child | ||
{ | ||
background-color: #ffb366; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Правило дублируется |
||
} | ||
|
||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,10 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
div:nth-child(4n + 1) > div:first-child | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Обрати внимание на псевдокласс only-of-type |
||
{ | ||
background-color: #ff6698; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,17 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
article | ||
{ | ||
margin-left: 15px; | ||
} | ||
|
||
ul | ||
{ | ||
list-style-type: square !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Получится ли не прибегать к |
||
/*вместо плюсиков, хотя можно использовать list-style-image | ||
и дать свою картинку, ну ты понял..*/ | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,16 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
[href*='.zip.'] | ||
{ | ||
background-color: #fff !important; | ||
} | ||
|
||
[href*='.zip'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Достаточно выбрать только те ссылки, которые заканчиваются на |
||
{ | ||
/*чем мне их выделять?*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Если хочешь добавить стрелочку, то проще всего будет поместить её в контент какого-нибудь псевдоэлемента, например, after. |
||
background-color: #cacaca; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,25 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
div | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Здесь достаточно выбрать первый элемент |
||
{ | ||
background-color: #ff6698 !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
.c1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Можно повысить специфичность правила и без |
||
{ | ||
background-color: #6698ff !important; | ||
} | ||
|
||
#id1 | ||
{ | ||
background-color: #ffb366 !important; | ||
} | ||
|
||
.c7 | ||
{ | ||
background-color: #ff6 !important; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,15 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
input:checked | ||
{ | ||
outline: none !important; | ||
} | ||
|
||
input:checked ~ input | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. В селекторе брата можно выбрать только те инпуты, которые не имеют псевдокласса |
||
{ | ||
outline: 1px solid #ff6698; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,15 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
.global-scope > div | ||
{ | ||
opacity: .3; | ||
} | ||
|
||
.global-scope > div:hover | ||
{ | ||
opacity: 1 !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Попробуй тоже обойтись здесь без |
||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,7 +12,35 @@ <h1 class="global-heading"> </h1> | |||||
|
||||||
<main class="global-results"> | ||||||
<style> | ||||||
/* your styles here */ | ||||||
.global-scope > div | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Кажется, здесь во всех селекторах можно не указывать родительский класс
Suggested change
|
||||||
{ | ||||||
background-color: #ffb366; | ||||||
} | ||||||
|
||||||
.global-scope > div > div | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Можно ли упростить селектор, используя псевдокласс |
||||||
{ | ||||||
background-color: #fff; | ||||||
} | ||||||
|
||||||
.global-scope > div:first-child > div:last-child | ||||||
{ | ||||||
background-color: #98ff66; | ||||||
} | ||||||
|
||||||
.global-scope > div:last-child > div:first-child | ||||||
{ | ||||||
background-color: #ff6; | ||||||
} | ||||||
|
||||||
.global-scope > div:nth-child(3) > div:nth-child(2n-1) | ||||||
{ | ||||||
background-color: #6698ff; | ||||||
} | ||||||
|
||||||
.global-scope > div:nth-child(2) > div:nth-child(2n) | ||||||
{ | ||||||
background-color: #ff6698; | ||||||
} | ||||||
</style> | ||||||
|
||||||
<section class="global-result"> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,22 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
div.c1.c2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Здесь точно нужен селектор тега? |
||
{ | ||
background-color: #6698ff; | ||
border: 2px solid #000; | ||
} | ||
|
||
.c1 | ||
{ | ||
background-color: #ff6698; | ||
border: 2px solid #000; | ||
} | ||
|
||
.c2 | ||
{ | ||
background-color: #ffb366; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -12,7 +12,16 @@ <h1 class="global-heading"> </h1> | |||||
|
||||||
<main class="global-results"> | ||||||
<style> | ||||||
/* your styles here */ | ||||||
div | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Правило из этого селектора должно применяться только к непосредственным потомкам |
||||||
{ | ||||||
border: 2px solid #000; | ||||||
} | ||||||
|
||||||
article.global-scope.global-scope_3 > div > div | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Можно ли здесь обойтись без всей первой части селектора?
Suggested change
|
||||||
{ | ||||||
background-color: #6698ff; | ||||||
border: none; | ||||||
} | ||||||
</style> | ||||||
|
||||||
<section class="global-result"> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,11 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
input#checkbox:checked ~ div | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Зачем столько селекторов? Не достаточно ли указать только идентификатор или только тег? |
||
{ | ||
background-color: black; | ||
color: #fff; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,20 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
article > div | ||
{ | ||
opacity: .3; | ||
} | ||
|
||
article > div:first-child | ||
{ | ||
opacity: 1; | ||
} | ||
|
||
article > div:last-child | ||
{ | ||
opacity: 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Здесь можно просты выбрать все картинки, у которых нет атрибута |
||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,15 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
[href*='//'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Выбери все абсолютные урлы, в которых не содержится |
||
{ | ||
color: #ff6698; | ||
} | ||
|
||
[href*='my-site.ru'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Для |
||
{ | ||
color: blue; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,25 @@ <h1 class="global-heading"> </h1> | |
|
||
<main class="global-results"> | ||
<style> | ||
/* your styles here */ | ||
[href]:visited | ||
{ | ||
color: #ffb366 !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Давай здесь везде тоже без |
||
} | ||
|
||
[href]:focus | ||
{ | ||
color: #98ff66 !important; | ||
} | ||
|
||
[href]:hover | ||
{ | ||
color: #ff6698 !important; | ||
} | ||
|
||
.link:hover | ||
{ | ||
color: #cacaca; | ||
} | ||
</style> | ||
|
||
<section class="global-result"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В двух селекторах с псевдоклассами полностью переопределяется правило, задающее стили для границы в селекторе тега
input
, хотя разница только в цвете этой границы. Можно в селекторах с псевдоклассами:first-child
и:focus
переназначать толькоborder-color