Skip to content

claude.ai chat UI hotfixes by myfonj

Details

Authormyfonj

LicenseCC0

Categoryclaude

Created

Updated

Size1.5 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Solid plain backgrounds = no ugly gradients banding.

Notes

Just a super quick raw draft: forcefully stripes away all background-images and replaces them willy-nilly with alpha transparent dark layers.

Source code

/* ==UserStyle==
@name           claude.ai chat UI hotfixes
@namespace      github.com/openstyles/stylus
@version        1.1.2
@description    Solid plain backgrounds = no ugly gradients banding
@author         myf
@license        CC0
==/UserStyle== */

@-moz-document url-prefix("https://claude.ai/chat/") {
 @media (prefers-color-scheme: dark) {
  *:not(#a#b#c) {
   &, &::before, &::after {
    background-image: none !important;
    backdrop-filter: none !important;
   }
   body &:where([class*=" bg-"]) ,
   body &:where([class*="-bg-"]) {
    background-color: #0001;
   }
   &:where([style*="-popper-"]) , 
   &:where([class~="fixed"][data-state="open"]) * {
    background-color: #000F;
   }
  &[role="status"],
  &:where([class*=" bg-"][class*=" border"][class*=" shadow"]),
  &:where([class~="sticky"]) * {
     background-color: #0009 ;
    }
   }
  :link {
   color: color-mix(in srgb, currentcolor 60%, linkText);
  }
  :visited {
   color: color-mix(in srgb, currentcolor 60%, visitedText);
  }
 }
 /*
 Fix fake-nested list indents:
 Claude mimics "nested list" by using 
 <ol><li>First group
 </ol>
 <ul><li>a<li>b<li>c...
 </ul>
 <ol start="2"><li>Second group
 </ol>
 <ul><li>d<li>e<li>f...
 </ul>
 */
 ol[depth="0"]:has(
  > li:only-child
 ):is(
  [start],
  :first-of-type
 ):has(+ ul){
  & + ul[depth="0"]:is(:has(+ ol),:last-of-type) {
   margin-left: 1em;
  }
 } 
 li::marker {
  color: color-mix(in srgb,currentcolor, transparent);
 }
}

Reviews

No reviews yet.