Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Theming with css - #71

Draft
rdbende wants to merge 1 commit into
masterfrom
css-theme
Draft

Theming with css#71
rdbende wants to merge 1 commit into
masterfrom
css-theme

Conversation

@rdbende

@rdbende rdbende commented Apr 17, 2022

Copy link
Copy Markdown
Member

Theming with css in Tukaan

app.theme = CssTheme(Path("./themes/sun-valley.css"))

sun-valley.css :

@source('./images/light');  /* Specify the image resource path */
@parent('clam');  /* Set parent theme (default is clam) */


$bg-color: #fafafa;
$fg-color: #202020;
$disabled-color: #a0a0a0;
$select-color: #ffffff;
$select-bg-color: #2f60d8;


* {
    /* Global settings */
    font-family: 'Segoe UI', sans;
    font-size: 10px;
    background: $bg-color;
    color: $fg-color;
    field-background: $bg-color;
}

*:focus {
    color: $select-bg-color;
}

*:disabled {
    color: $disabled-color;
}

*::caret {
    /* Global caret-styling */
    width: 1px;
    color: $fg-color;
}

*::selection {
    /* Global selection colors */
    background: $select-bg-color;
    color: $select-color;
}

button,
button:selected {
    image: $button-rest;  /* Use a loaded image for the widget */
    border: 4px;  /* How much to crop them image when stretching */
    padding: 8px 4px;  /* Padding inside the widget */
    anchor: center;
    sticky: nsew;
}

button:hover {
    image: $button-hover;
    color: #1a1a1a;
}

button:pressed {
    image: $button-pressed;
    color: #636363;
}

button:disabled,
button:selected:disabled {
    image: $button-disabled;
    color: #a2a2a2;
}

@sumeshir26

Copy link
Copy Markdown

Maybe add this to the docs?

@rdbende

rdbende commented Apr 18, 2022

Copy link
Copy Markdown
Member Author

Maybe add this to the docs?

Yeah, I'll add it as soon as this feature is finished (currently it only parses the css file, but doesn't generate a Tcl theme script from it).
Actually I started writing the theming section in the docs several times, but haven't finished it yet.

@Moosems

Moosems commented Apr 27, 2022

Copy link
Copy Markdown
Collaborator

We want to add this?

@rdbende

rdbende commented Apr 28, 2022

Copy link
Copy Markdown
Member Author

Will add it! I'm in the process of writing a comprehensive tutorial on theming, and that will include CSS stuff.

@Moosems

Moosems commented Apr 28, 2022

Copy link
Copy Markdown
Collaborator

Sounds great!

@rdbende rdbende mentioned this pull request Jul 1, 2022
10 tasks
@rdbende rdbende added the Area: theming Look and feel related stuff label Jul 2, 2022

@athrvvvv athrvvvv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@rdbende

rdbende commented Jan 7, 2023

Copy link
Copy Markdown
Member Author

No it doesn't

@rdbende
rdbende marked this pull request as draft January 7, 2023 19:23
@rdbende

rdbende commented Jan 7, 2023

Copy link
Copy Markdown
Member Author

It's at most a tenth of what it should be.

@athrvvvv

athrvvvv commented Jan 7, 2023

Copy link
Copy Markdown

bruhhh

@rdbende

rdbende commented Jan 7, 2023

Copy link
Copy Markdown
Member Author

This isn't even a complete CSS parser.

@rdbende rdbende mentioned this pull request Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: theming Look and feel related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants