A fork of the Materia GTK theme.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

sass: Make has-alpha() private

roundabout,
created on Saturday, 3 April 2021, 00:03:06 (1617408186), received on Sunday, 11 May 2025, 13:23:02 (1746969782)
Author identity: nana-4 <hnmaigo@gmail.com>

12ff30cb25864ab1d8df6f733735bae4be7521d0

src/_colors.scss

@@ -11,7 +11,7 @@ $light-topbar: false !default;

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            // Determine whether the color has alpha.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @function has-alpha($color) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @function _has-alpha($color) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              @return if(alpha($color) < 1, true, false);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -203,46 +203,46 @@ $overlay-selected: rgba($primary, .24);

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function hint($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .6, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .6), rgba($color, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .38, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .38), rgba($color, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled-hint($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function stroke($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled-stroke($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .12, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .12), rgba($color, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function divider($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .12, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .12), rgba($color, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function fill($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .08, .08));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .08), rgba($color, .08));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function entry-fill($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .04, .04));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .04), rgba($color, .04));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function scrollbar-thumb($color, $state: null) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              @if $state == null {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .38, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .38), rgba($color, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "hover" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .48, .6));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .48), rgba($color, .6));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "pressed" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .6, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .6), rgba($color, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "disabled" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                @error "Invalid type: '#{$state}'";
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                            
                                

src/_colors.scss.template

@@ -11,7 +11,7 @@ $light-topbar: false !default;

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            // Determine whether the color has alpha.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @function has-alpha($color) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        @function _has-alpha($color) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              @return if(alpha($color) < 1, true, false);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -196,46 +196,46 @@ $overlay-selected: rgba($primary, %MATERIA_SELECTION_OPACITY%);

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function hint($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .6, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .6), rgba($color, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .38, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .38), rgba($color, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled-hint($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function stroke($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function disabled-stroke($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .12, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .12), rgba($color, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function divider($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .12, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .12), rgba($color, .2));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function fill($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .08, .08));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .08), rgba($color, .08));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function entry-fill($color) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return rgba($color, if(has-alpha($color), .04, .04));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                          @return if(_has-alpha($color), rgba($color, .04), rgba($color, .04));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            @function scrollbar-thumb($color, $state: null) {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              @if $state == null {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .38, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .38), rgba($color, .5));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "hover" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .48, .6));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .48), rgba($color, .6));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "pressed" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .6, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .6), rgba($color, .7));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else if $state == "disabled" {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return rgba($color, if(has-alpha($color), .26, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            @return if(_has-alpha($color), rgba($color, .26), rgba($color, .3));
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              } @else {
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                @error "Invalid type: '#{$state}'";
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                              }