-
Hello, I wanted to know if CSS scripts can be easily configured like in stylus. For example, in the script Collapsing Sidebars for Discord, there is a configure option which shows a popup that allows easy changing of the width and transition time. Can this also be done in firemonkey? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Previously #293 CSS scripts can be configured by editing the script e.g. changing the values. ATM, similar to other userscript managers, there is no Graphical-User-Interface like Stylus. If there is a popular demand, then I can work on it. |
Beta Was this translation helpful? Give feedback.
-
Notes
TBH, it is possible to apply variables natively using It is possible to implement a GUI for quick configure in FireMonkey but I would implement it differently and natively. The problem is that the existing userStyles wont be compatible until they are updated. For example,
|
Beta Was this translation helpful? Give feedback.
-
For example, here is Collapsing Sidebars for Discord as userCSS for FireMonkey. /* ==UserCSS==
@name Collapsing Sidebars for Discord
@namespace https://gitlab.com/GrantMoyer
@version 1.1.0
@description Makes the sidebars on discord collapse when not hovered
@author Grant Moyer
@homepageURL https://gitlab.com/GrantMoyer/collapsing-sidebars-for-discord
@updateURL https://gitlab.com/GrantMoyer/collapsing-sidebars-for-discord/-/raw/master/collapsing_sidebars.user.css
@license CC0-1.0
@match https://discord.com/channels*
==/UserCSS== */
:root {
--channel-list-width: 50px;
--online-list-width: 70px;
--transition-duration: 0.25s;
}
@media (max-width: 950px) {
[class*='sidebar-']:not(:hover) [class*='icons-'] {
margin-left: -26px;
margin-top: 6px;
margin-bottom: -6px;
}
[class*='sidebar-']:not(:hover) [class*='iconSpacing-'] {
background-color: var(--background-tertiary);
padding-top: 2px;
padding-left: 2px;
padding-right: 2px;
}
[class*='sidebar-']:not(:hover) [class*='list-'] {
padding-left: 4px;
}
[class*='sidebar-']:not(:hover) {
width: var(--channel-list-width);
margin-right: 0;
}
[class*='sidebar-'] {
margin-right: calc(-240px + var(--channel-list-width));
}
[class*='sidebar-']:not(:hover) [class*='children-'] {
opacity: 0;
}
[class*='membersWrap-'] {
margin-left: calc(-240px + var(--online-list-width));
}
[class*='members-']:not(:hover) {
width: var(--online-list-width);
margin-left: calc(240px - var(--online-list-width));
}
[class*='members-']:not(:hover) [class*='icon-'] {
position: absolute;
left: 0px;
padding: 2px;
background-color: var(--background-tertiary);
border-radius: 50%;
}
}
[class*='membersWrap-'] {
transition: margin var(--transition-duration);
}
[class*='members-'] {
transition: width var(--transition-duration), margin var(--transition-duration);
}
[class*='icons-'] {
transition: margin var(--transition-duration);
}
[class*='iconSpacing-'] {
transition: margin var(--transition-duration), background-color var(--transition-duration), padding var(--transition-duration);
border-radius: 50%;
}
[class*='list-'] {
transition: padding var(--transition-duration);
}
[class*='sidebar-'] {
transition: width var(--transition-duration), margin var(--transition-duration);
z-index: 1000;
}
[class*='sidebar-'] [class*='children-'] {
transition: opacity var(--transition-duration);
} |
Beta Was this translation helpful? Give feedback.
-
I am going to work on implementing ref: #293 |
Beta Was this translation helpful? Give feedback.
Previously #293
CSS scripts can be configured by editing the script e.g. changing the values.
ATM, similar to other userscript managers, there is no Graphical-User-Interface like Stylus.
If there is a popular demand, then I can work on it.