Skip to content

Commit 42ee22b

Browse files
committed
Show device frame only on larger screens
1 parent f3b96bd commit 42ee22b

1 file changed

Lines changed: 70 additions & 68 deletions

File tree

src/css/custom.css

Lines changed: 70 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,80 +1467,82 @@ code {
14671467
}
14681468
}
14691469

1470-
.device-frame {
1471-
--device-frame-bezel: 10px;
1472-
--device-frame-radius: 67px;
1473-
--device-frame-screen-radius: calc(
1474-
var(--device-frame-radius) - var(--device-frame-bezel) - 2px
1475-
);
1470+
@media (min-width: 997px) {
1471+
.device-frame {
1472+
--device-frame-bezel: 10px;
1473+
--device-frame-radius: 67px;
1474+
--device-frame-screen-radius: calc(
1475+
var(--device-frame-radius) - var(--device-frame-bezel) - 2px
1476+
);
14761477

1477-
position: relative;
1478-
display: inline-block;
1479-
isolation: isolate;
1480-
box-sizing: border-box;
1481-
max-width: 100%;
1482-
margin: var(--ifm-leading) 0;
1483-
line-height: 0;
1484-
padding: var(--device-frame-bezel);
1485-
border-radius: var(--device-frame-radius);
1486-
border: 1px solid rgba(130, 137, 145, 0.5);
1487-
background: linear-gradient(
1488-
180deg,
1489-
#3a4048 0%,
1490-
#20242b 18%,
1491-
#050608 54%,
1492-
#292d34 100%
1493-
);
1494-
box-shadow:
1495-
0 0 0 1.5px #050608,
1496-
0 8px 18px rgba(15, 23, 42, 0.12),
1497-
0 -1px 0 rgba(255, 255, 255, 0.08) inset,
1498-
1px 0 0 rgba(255, 255, 255, 0.14) inset,
1499-
-1px 0 0 rgba(255, 255, 255, 0.08) inset;
1500-
vertical-align: top;
1478+
position: relative;
1479+
display: inline-block;
1480+
isolation: isolate;
1481+
box-sizing: border-box;
1482+
max-width: 100%;
1483+
margin: var(--ifm-leading) 0;
1484+
line-height: 0;
1485+
padding: var(--device-frame-bezel);
1486+
border-radius: var(--device-frame-radius);
1487+
border: 1px solid rgba(130, 137, 145, 0.5);
1488+
background: linear-gradient(
1489+
180deg,
1490+
#3a4048 0%,
1491+
#20242b 18%,
1492+
#050608 54%,
1493+
#292d34 100%
1494+
);
1495+
box-shadow:
1496+
0 0 0 1.5px #050608,
1497+
0 8px 18px rgba(15, 23, 42, 0.12),
1498+
0 -1px 0 rgba(255, 255, 255, 0.08) inset,
1499+
1px 0 0 rgba(255, 255, 255, 0.14) inset,
1500+
-1px 0 0 rgba(255, 255, 255, 0.08) inset;
1501+
vertical-align: top;
15011502

1502-
&::before,
1503-
&::after {
1504-
content: '';
1505-
position: absolute;
1506-
z-index: -1;
1507-
width: 6px;
1508-
}
1503+
&::before,
1504+
&::after {
1505+
content: '';
1506+
position: absolute;
1507+
z-index: -1;
1508+
width: 6px;
1509+
}
15091510

1510-
&::before {
1511-
left: -6px;
1512-
top: 112px;
1513-
height: 198px;
1514-
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 198'%3E%3Crect width='6' height='30' rx='2' fill='%23171b20'/%3E%3Crect y='64' width='6' height='57' rx='2' fill='%23171b20'/%3E%3Crect y='141' width='6' height='57' rx='2' fill='%23171b20'/%3E%3C/svg%3E")
1515-
center / 100% 100% no-repeat;
1516-
filter: drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.14))
1517-
drop-shadow(1px 0 0 rgba(0, 0, 0, 0.34));
1518-
}
1511+
&::before {
1512+
left: -6px;
1513+
top: 112px;
1514+
height: 198px;
1515+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 198'%3E%3Crect width='6' height='30' rx='2' fill='%23171b20'/%3E%3Crect y='64' width='6' height='57' rx='2' fill='%23171b20'/%3E%3Crect y='141' width='6' height='57' rx='2' fill='%23171b20'/%3E%3C/svg%3E")
1516+
center / 100% 100% no-repeat;
1517+
filter: drop-shadow(-1px 0 0 rgba(255, 255, 255, 0.14))
1518+
drop-shadow(1px 0 0 rgba(0, 0, 0, 0.34));
1519+
}
15191520

1520-
&::after {
1521-
right: -6px;
1522-
top: 154px;
1523-
height: 84px;
1524-
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 84'%3E%3Crect width='6' height='84' rx='2' fill='%23171b20'/%3E%3C/svg%3E")
1525-
center / 100% 100% no-repeat;
1526-
filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.14))
1527-
drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.34));
1528-
}
1521+
&::after {
1522+
right: -6px;
1523+
top: 154px;
1524+
height: 84px;
1525+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 84'%3E%3Crect width='6' height='84' rx='2' fill='%23171b20'/%3E%3C/svg%3E")
1526+
center / 100% 100% no-repeat;
1527+
filter: drop-shadow(1px 0 0 rgba(255, 255, 255, 0.14))
1528+
drop-shadow(-1px 0 0 rgba(0, 0, 0, 0.34));
1529+
}
15291530

1530-
& > p {
1531-
margin: 0;
1532-
}
1531+
& > p {
1532+
margin: 0;
1533+
}
15331534

1534-
& > :is(img, video, .video-player),
1535-
& > p > :is(img, video, .video-player) {
1536-
display: block;
1537-
margin: 0;
1538-
overflow: hidden;
1539-
outline: none;
1540-
box-shadow: none;
1541-
border-radius: var(--device-frame-screen-radius);
1542-
clip-path: inset(0 round var(--device-frame-screen-radius));
1543-
background: #000;
1535+
& > :is(img, video, .video-player),
1536+
& > p > :is(img, video, .video-player) {
1537+
display: block;
1538+
margin: 0;
1539+
overflow: hidden;
1540+
outline: none;
1541+
box-shadow: none;
1542+
border-radius: var(--device-frame-screen-radius);
1543+
clip-path: inset(0 round var(--device-frame-screen-radius));
1544+
background: #000;
1545+
}
15441546
}
15451547
}
15461548

0 commit comments

Comments
 (0)