Skip to content

Commit 4e72de3

Browse files
committed
iOS 16/17 Safariでのページクラッシュを回避するために相対色のネストをやめた
cpprefjp/site#1457
1 parent e0999c1 commit 4e72de3

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

css/kunai/site/sidebar.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,11 @@ main[role="main"] .kunai-sidebar.force-legacy {
152152
.kunai-sidebar > .tree.v2 {
153153
$cl-text: #222;
154154
$cl-back: #fbfbfb;
155-
$cl-link: hsl(from color-mix(in srgb, #2a6496, white 15%) h calc(s + 10%) l);
156-
$cl-list-hover: rgb(from #f0f0fd r g b / .9);
155+
/* 相対色の入れ子を回避: color-mixの結果を固定値に変換 */
156+
/* #2a6496をwhite 15%とミックス → #4680b3 */
157+
/* さらにsaturation +10% → #3d81bd */
158+
$cl-link: #3d81bd;
159+
$cl-list-hover: rgba(240, 240, 253, 0.9);
157160

158161
display: flex;
159162
height: 100%;
@@ -250,7 +253,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
250253
content: "";
251254
display: block;
252255
height: 2px;
253-
border-bottom: 1px solid rgb(from $c r g b / 0.7);
256+
border-bottom: 1px solid rgba(173, 173, 173, 0.7);
254257
flex-basis: 100%;
255258
}
256259
}
@@ -268,7 +271,8 @@ main[role="main"] .kunai-sidebar.force-legacy {
268271
> .expandbar > a {
269272
flex-basis: auto;
270273
margin-bottom: 0;
271-
color: hsl(from $cl-link h calc(s - 20%) l);
274+
/* $cl-linkのsaturation -20% */
275+
color: #4a7cac;
272276
}
273277

274278
&:first-child, &:last-child {
@@ -548,7 +552,8 @@ main[role="main"] .kunai-sidebar.force-legacy {
548552
// background-color: rgba(100, 100, 100, .03);
549553
font-size: .9em;
550554

551-
$c-b: 1px solid rgb(from color-mix(in srgb, hsl(from $cl-link h calc(s - 5%) l), white 65%) r g b / 0.4);
555+
/* $cl-linkのs-5%をwhite 65%とミックス → 半透明化 */
556+
$c-b: 1px solid rgba(165, 195, 215, 0.4);
552557
border-left: $c-b;
553558
border-bottom: $c-b;
554559
border-radius: 4px;
@@ -616,7 +621,7 @@ main[role="main"] .kunai-sidebar.force-legacy {
616621
> .self {
617622
$c: #87ceeb;
618623
border-left: 4px solid $c;
619-
border-bottom: 1px dashed rgb(from $c r g b / 0.7);
624+
border-bottom: 1px dashed rgba(135, 206, 235, 0.7);
620625
margin-bottom: .5em;
621626
// box-shadow: 0 3px 13px -6px rgba(20, 20, 20, 0.2);
622627

0 commit comments

Comments
 (0)