Tweaks for userstyles.world - Change screenshot size, Details and Statistics next to each other, Code wrap, Hide [๐] from links and more!
smol tweaks for UserStyles.World by pabli

Details
Authorpabli
LicenseMIT
Categoryuserstyles.world
Created
Updated
Size2.3 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Source code
/* ==UserStyle==
@name smol tweaks for USw
@namespace https://userstyles.world/user/pabli
@version 1.3.0
@description Some tweaks for userstyles.world
@author Pabli
@preprocessor stylus
@var number imgSize "Screenshot size %" ['%', 75, 0, 100, 1]
@var select imgH "Enlarge screenshot on" ["hover", "click", "disabled"]
@var number imgSizeH "Screenshot size on hover/click %" ['%', 100, 0, 100, 1]
@var checkbox linkIco "Hide [๐] from links" 1
@var checkbox detStat "Details and Statistics next to each other" 0
@var number descSize "Description max-height (0 = disabled)" ['px', 9999, 0, null, 1]
@var number preSize "Source code max-height (0 = disabled)" ['rem', 40, 0, null, 1]
@var checkbox codeWrap "Code wrap" 0
==/UserStyle== */
@-moz-document url-prefix("https://userstyles.world/style/") {
#preview > .card {
width: imgSize
transition: 0.3s
margin: auto
}
if imgH == "hover" {
#preview > .card {
cursor: zoom-in
&:hover {
width: imgSizeH
}
}
}
if imgH == "click" {
#preview > .card {
cursor: zoom-in
&:active {
width: imgSizeH
}
}
}
if detStat {
@media screen and (min-width: 1300px) {
html body>main {
flex-direction: row
flex-wrap: wrap
justify-content: center
margin: 0 auto
max-width: var(--layout-max-width)
}
html body>main>* {
width: 100%
margin: 0
padding: 0 1rem
max-width: var(--layout-max-width)
}
#details, #stats {
max-width: calc(var(--layout-max-width)/2)
}
}
}
if descSize != 0 {
#description .md {
max-height: descSize
overflow-y: auto
}
}
if preSize != 0 {
#code pre {
min-height: 9rem
height: auto
max-height: preSize
overflow: auto
}
}
if codeWrap {
#code code {
white-space: break-spaces
overflow-wrap: break-word
}
}
}
@-moz-document domain("userstyles.world") {
if linkIco {
a[href^='/link/']::after,
a[href^='http']::after {
content: unset
}
}
}