Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

I've streamlined theme development in Ktistec.

Moved Technical Discussion
2 2 2
  • I've streamlined theme development in Ktistec. The theming system uses a hierarchy of CSS custom properties and fallbacks. Theme authors can customize a theme at multiple levels:

    Base Colors Only

    Define only base colors like --text-primary, --bg-primary, --bg-input, --semantic-primary, etc. Derived colors will auto-generate using color-mix formulas. For example:

    :root { --semantic-primary: #ffa500; }

    From this one line, theme-appropriate colors like --bg-accent-code, --anchor-color, etc. auto-generate.

    Base Colors Plus Derived Colors

    Define base colors and derived colors. Derived colors use custom values when defined. Undefined derived colors auto-generate. For example:

    :root {
        --text-primary: #333;
        --text-primary-2: #ff0000;  /* red for this specific shade */
    }

    Given this theme, derived shades like --text-primary-1, --text-primary-3, and --text-primary-4 auto-generate. --text-primary-2 is red.

    The simplest possible interesting theme redefines the primary semantic color. The single line above (in Base Colors Only) would result in the following, with button color, link color, disabled, selected, and hover states all derived automatically:

    screenshot of the setting page with the primary semantic color defined

    These changes will be in the upcoming release. Existing themes will continue to work, as is.

  • I've streamlined theme development in Ktistec. The theming system uses a hierarchy of CSS custom properties and fallbacks. Theme authors can customize a theme at multiple levels:

    Base Colors Only

    Define only base colors like --text-primary, --bg-primary, --bg-input, --semantic-primary, etc. Derived colors will auto-generate using color-mix formulas. For example:

    :root { --semantic-primary: #ffa500; }

    From this one line, theme-appropriate colors like --bg-accent-code, --anchor-color, etc. auto-generate.

    Base Colors Plus Derived Colors

    Define base colors and derived colors. Derived colors use custom values when defined. Undefined derived colors auto-generate. For example:

    :root {
        --text-primary: #333;
        --text-primary-2: #ff0000;  /* red for this specific shade */
    }

    Given this theme, derived shades like --text-primary-1, --text-primary-3, and --text-primary-4 auto-generate. --text-primary-2 is red.

    The simplest possible interesting theme redefines the primary semantic color. The single line above (in Base Colors Only) would result in the following, with button color, link color, disabled, selected, and hover states all derived automatically:

    screenshot of the setting page with the primary semantic color defined

    These changes will be in the upcoming release. Existing themes will continue to work, as is.

    @toddsundsted did you use any literature for deciding on the theme basic colors and how to combine them?

    I've been struggling with something very similar a while back and the material design specs seemed too complex for what I wanted, but nothing else popped up on search.

  • System moved this topic from General Discussion

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti
  • Happy Thanksgiving.

    Fediverso thanksgiving fediverse mastodon
    2
    1
    0 Votes
    2 Posts
    9 Views
    @mookie cucinate trump
  • 0 Votes
    1 Posts
    5 Views
    ActivityPub doesn't need task forces to build onboarding resources.It just takes one person and a bit of courage.For both developers and the public.https://fediverse.info - for the publicactivitypub.social - for devs (coming soon)#activityPub
  • 0 Votes
    1 Posts
    6 Views
    Alguém aqui conhece algum editor da @wikimediafoundation ?Quero editar o artigo sobre o #activitypub em #ptbr, ele está MUITO POBRE
  • 0 Votes
    1 Posts
    11 Views
    Tech people talk about tech too much. I really really REALLY want to use all the awesome privacy friendly FOSS (and similar) stuff, but I am not a techie person! I don't know how to program, nor do I want to. And every SINGLE time I try to find out even what thing (OS, program, app, service, etc) to use, let alone how, and I search for it... I get techie-focused answers. It's complete gibberish to me! Absolutely useless. It makes me feel actively unwelcome even though I really care about using alternatives to Windows, Meta, X and other dystopic nonsense. For example: I'm like "How do I start a non-enshittified group chat to talk about a thing?" and all the results are technobabble to me. I don't even know if the words they use are supposed to be normal english words or if they refer to orgs or groups or apps or some weird coding wizardry. I am so lost, every single time. I stick with it though. But like. I wonder if the tech people realise that this is happening???? Because they probably understand what they're talking about. And they seem to not realise that not everyone does. I'm not trying to blame or shame anyone or even complaining as such (a little bit complaining, ngl), mostly just giving feedback. This is not an issue with a singe thing but with ALL of it as a whole! Including #GNU #Linux the #Fediverse #Matrix and most #FOSS apps. My sincere wish: Give non-techie people an EASY TO FIND and easy to read and easy to understand and easy to implement guide about how to use the things as an alternative to using big corporation services, ie, "I just want it to work" and not have to worry about the technical side of things. (examples in thread)