Haoming02 / sd-webui-tabs-extension

An Extension for Automatic1111 Webui that organizes Extensions into Tabs
MIT License
85 stars 3 forks source link

Make buttons prettier #14

Closed wogam closed 4 months ago

wogam commented 4 months ago

You can edit the CSS to something like this:

#tabs_ex_txt, #tabs_ex_img {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 8px 0;
    padding: 6px;
    border-radius: 8px;
    background-color: var(--background-fill-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#tabs_ex_txt .tab_button, #tabs_ex_img .tab_button {
    margin: 4px; /* Reduced from 6px to 4px */
    padding: 6px 12px; /* Reduced from 8px 16px to 6px 12px */
    border: none;
    border-radius: 6px; /* Reduced from 8px to 6px */
    color: var(--button-secondary-text-color);
    background-color: var(--block-background-fill);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

#tabs_ex_txt .tab_button:hover, #tabs_ex_img .tab_button:hover {
    transform: translateY(-1px); 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); 
}

#tabs_ex_txt .tab_button.selected, #tabs_ex_img .tab_button.selected {
    background-color: var(--border-color-accent);
    color: white;
    font-weight: bold;
}

#tabs_ex_txt .tab_button.active, #tabs_ex_img .tab_button.active {
    color: cornflowerblue;
    font-weight: bold;
}

To look like this: image

This was done in about a min or two so isn't the best, but you get the idea.

Haoming02 commented 4 months ago

implemented some of them, including making it respect users' color themes