nana-4 / materia-theme

A Material Design theme for GNOME/GTK based desktop environments
GNU General Public License v2.0
3.42k stars 254 forks source link

_colors.scss refactoring for change_color.sh and new colorscheme #210

Closed actionless closed 6 years ago

actionless commented 6 years ago

hi! i saw in the release notes what you are going to change the colorscheme soon could you please wait with that until i'll submit you a new global.scss.template for change_color.sh script? (so it won't rely on the colors anymore). otherwise changing the colorscheme will break the change_color.sh script. i'll try to finish it within couple of days

nana-4 commented 6 years ago

Hi! Thanks for letting me know!

So I will wait until you submit the PR. :smile: Thank you in advance for your work!

actionless commented 6 years ago

actually i've took a look on it now, it seems to be easier than i 've expected so i can submit it right now

however on metacity/gtk2 themes and all svg assets that replacement will still rely on the colors, so i still thinking how it will be better to address the 'migration' for them

actionless commented 6 years ago

(that was so easy thanks to your recent changes where you made one global scss for all the themes, good work on that!)

actionless commented 6 years ago

so, any ideas about migration of non-scss themes and svg assets?

nana-4 commented 6 years ago

I was just thinking about it, but sorry, I don't have any good ideas yet.

Considering maintainability, the current method may be better than adding templates to metacity/gtk2/svg like scss.

actionless commented 6 years ago

i hope that should help to perform that migration manually: https://github.com/nana-4/materia-theme/pull/212

actionless commented 6 years ago

because now the replacement palette is very small:

echo "== Converting theme into template..."

for FILEPATH in "${PATHLIST[@]}"; do find "${FILEPATH}" -type f -exec sed -i'' \ -e 's/#000000/%FG%/g' \ -e 's/#212121/%FG%/g' \ -e 's/#757575/%INACTIVE_FG%/g' \ -e 's/#9E9E9E/%INACTIVE_FG%/g' \ -e 's/#c3c8ca/%INACTIVE_FG%/g' \ -e 's/#BDBDBD/%MENU_BG2%/g' \ -e 's/#E0E0E0/%SEL_BG%/g' \ -e 's/#F5F5F5/%BG%/g' \ -e 's/#FAFAFA/%BTN_BG%/g' \ -e 's/#FF4081/%ACCENT_BG%/g' \ -e 's/#42A5F5/%SEL_BG%/g' \ -e 's/#FFFFFF/%TXT_BG%/g' \ -e 's/#333e43/%MENU_BG%/g' \ -e 's/#455A64/%MENU_BG%/g' \ -e 's/#37474F/%MENU_BG%/g' \ -e 's/#3b484e/%MENU_BG2%/g' \ -e 's/#414f56/%MENU_BG3%/g' \ -e 's/Materia/%OUTPUT_THEME_NAME%/g' \ {} \; ; done

nana-4 commented 6 years ago

That will definitely be helpful !! So can I start migrating the color scheme and close this now?

actionless commented 6 years ago

could you also update the replacement palette during the migration?

nana-4 commented 6 years ago

Excuse me, but to be sure, what's "replacement palette"? Is it _colors.scss.template, right?

actionless commented 6 years ago

these lines: https://github.com/nana-4/materia-theme/blob/master/change_color.sh#L140-L156

nana-4 commented 6 years ago

I understand. Of cause I'll update these lines too!

actionless commented 6 years ago

thanks in advance!

actionless commented 6 years ago

it seems something is not right after the update:

== Converting theme into template...
== Filling the template with the new colorscheme...
== Generating the CSS...
Error: Undefined variable: "$tooltip-bg-color".
        on line 2056 of src/_sass/gtk/_common-3.18.scss
>>     background-color: rgba($tooltip_bg_color, $higher_opacity);
   ---------------------------^
nana-4 commented 6 years ago

I'm so sorry for the delay in my response... I've fixed it now.

actionless commented 6 years ago

thanks a lot! it works again as good as before, there are only minor issues, but i've created a separate ticket for that: https://github.com/nana-4/materia-theme/issues/216