_common.scss 115 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858
  1. @function gtkalpha($c,$a) {
  2. @return unquote("alpha(#{$c},#{$a})");
  3. }
  4. $ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  5. $asset_suffix: if($variant=='dark', '-dark', '');
  6. $backdrop_transition: 200ms ease-out;
  7. $button_transition: all 200ms $ease-out-quad;
  8. $button_radius: 5px;
  9. $menu_radius: 5px;
  10. $window_radius: $button_radius + 3;
  11. $popover_radius: $button_radius + 4;
  12. // Optional compact sizes for buttons, headerbar and headerbar widgets
  13. $_sizevariant: 'default'; //compact otherwise
  14. $_headerbar_height: if($_sizevariant=='default', 46px, 40px);
  15. $_entry_height: if($_sizevariant=='default', 32px, 28px);
  16. $_btn_pad: if($_sizevariant=='default', 4px 9px, 2px 6px);
  17. $_hb_btn_pad: if($_sizevariant=='default', 6px, 5px);
  18. $_img_btn_pad: if($_sizevariant=='default', 5px, 2px);
  19. $_sel_menu_pad: if($_sizevariant=='default', 6px 10px, 4px 10px);
  20. $_circ_btn_pad: if($_sizevariant=='default', 4px, 2px);
  21. $_switch_margin: if($_sizevariant=='default', 10px, 7px);
  22. * {
  23. padding: 0;
  24. -GtkToolButton-icon-spacing: 4;
  25. -GtkTextView-error-underline-color: $error_color;
  26. // The size for scrollbars. The slider is 2px smaller, but we keep it
  27. // up so that the whole area is sensitive to button presses for the
  28. // slider. The stepper button is larger in both directions, the slider
  29. // only in the width
  30. -GtkScrolledWindow-scrollbar-spacing: 0;
  31. -GtkToolItemGroup-expander-size: 11;
  32. -GtkWidget-text-handle-width: 20;
  33. -GtkWidget-text-handle-height: 24;
  34. -GtkDialog-button-spacing: 4;
  35. -GtkDialog-action-area-border: 0;
  36. // We use the outline properties to signal the focus properties
  37. // to the adwaita engine: using real CSS properties is faster,
  38. // and we don't use any outlines for now.
  39. outline-color: gtkalpha(currentColor, 0.3);
  40. outline-style: dashed;
  41. outline-offset: -3px;
  42. outline-width: 1px;
  43. -gtk-outline-radius: $button-radius - 2;
  44. -gtk-secondary-caret-color: $selected_bg_color
  45. }
  46. /***************
  47. * Base States *
  48. ***************/
  49. .background {
  50. color: $fg_color;
  51. background-color: $bg_color;
  52. &:backdrop {
  53. color: $backdrop_fg_color;
  54. background-color: $backdrop_bg_color;
  55. text-shadow: none;
  56. -gtk-icon-shadow: none;
  57. }
  58. }
  59. /*
  60. These wildcard seems unavoidable, need to investigate.
  61. Wildcards are bad and troublesome, use them with care,
  62. or better, just don't.
  63. Everytime a wildcard is used a kitten dies, painfully.
  64. */
  65. *:disabled { -gtk-icon-effect: dim; }
  66. .gtkstyle-fallback {
  67. color: $fg_color;
  68. background-color: $bg_color;
  69. &:hover {
  70. color: $fg_color;
  71. background-color: lighten($bg_color, 10%);
  72. }
  73. &:active {
  74. color: $fg_color;
  75. background-color: darken($bg_color, 10%);
  76. }
  77. &:disabled {
  78. color: $insensitive_fg_color;
  79. background-color: $insensitive_bg_color;
  80. }
  81. &:selected {
  82. color: $selected_fg_color;
  83. background-color: $selected_bg_color;
  84. }
  85. }
  86. .view,
  87. %view {
  88. color: $text_color;
  89. caret-color: $caret_color;
  90. background-color: $base_color;
  91. &:backdrop {
  92. color: $backdrop_text_color;
  93. background-color: $backdrop_base_color;
  94. &:disabled { color: $backdrop_insensitive_color; }
  95. }
  96. &:disabled {
  97. color: $insensitive_fg_color;
  98. background-color: $insensitive_bg_color;
  99. }
  100. &:selected {
  101. &:focus, & {
  102. @extend %selected_items;
  103. border-radius: 3px;
  104. }
  105. }
  106. }
  107. .view,
  108. textview {
  109. text {
  110. @extend %view;
  111. selection { &:focus, & { @extend %selected_items; }}
  112. }
  113. }
  114. textview border { background-color: mix($bg_color, $base_color, 50%); }
  115. iconview { @extend .view; }
  116. .rubberband,
  117. rubberband {
  118. border: 1px solid darken($selected_bg_color, 10%);
  119. background-color: transparentize(darken($selected_bg_color, 10%), 0.8);
  120. }
  121. flowbox {
  122. rubberband { @extend rubberband; }
  123. flowboxchild {
  124. padding: 3px;
  125. &:selected {
  126. @extend %selected_items;
  127. outline-offset: -2px;
  128. }
  129. }
  130. }
  131. .content-view .tile {
  132. margin: 2px;
  133. background-color: if($variant=='light', transparent, black);
  134. border-radius: 0;
  135. padding: 0;
  136. &:backdrop { background-color: if($variant=='light', transparent, darken($backdrop_base_color,5%)); }
  137. &:active, &:selected { background-color: if($variant=='light', transparent, $selected_bg_color); }
  138. &:disabled { background-color: if($variant=='light', transparent, $insensitive_bg_color); }
  139. }
  140. label {
  141. caret-color: currentColor; // this shouldn't be needed.
  142. &.separator {
  143. @extend .dim-label;
  144. }
  145. &:selected { @extend %nobg_selected_items; }
  146. selection {
  147. background-color: $selected_bg_color;
  148. color: $selected_fg_color;
  149. }
  150. &:disabled {
  151. color: $insensitive_fg_color;
  152. button & { color: inherit; }
  153. &:backdrop {
  154. color: $backdrop_insensitive_color;
  155. button & { color: inherit; }
  156. }
  157. selection { @extend %selected_items_disabled; }
  158. }
  159. &:backdrop {
  160. selection { @extend %selected_items_backdrop; }
  161. }
  162. &.error {
  163. color: $error_color;
  164. &:disabled { color: transparentize($error_color,0.5); }
  165. &:disabled:backdrop { color: transparentize($error_color,0.6); }
  166. }
  167. }
  168. .dim-label {
  169. opacity: 0.55;
  170. text-shadow: none;
  171. }
  172. assistant {
  173. .sidebar {
  174. background-color: $base_color;
  175. border-top: 1px solid $borders_color;
  176. &:backdrop {
  177. background-color: $backdrop_base_color;
  178. border-color: $backdrop_borders_color;
  179. }
  180. }
  181. &.csd .sidebar { border-top-style: none; }
  182. .sidebar label { padding: 6px 12px; }
  183. .sidebar label.highlight { background-color: mix($bg_color, $fg_color, 80%); }
  184. }
  185. %osd,
  186. .osd {
  187. color: $osd_fg_color;
  188. border: none;
  189. background-color: $osd_bg_color;
  190. background-clip: padding-box;
  191. text-shadow: 0 1px black;
  192. -gtk-icon-shadow: 0 1px black;
  193. &:backdrop {
  194. text-shadow: none;
  195. -gtk-icon-shadow: none;
  196. }
  197. }
  198. /*********************
  199. * Spinner Animation *
  200. *********************/
  201. @keyframes spin {
  202. to { -gtk-icon-transform: rotate(1turn); }
  203. }
  204. spinner {
  205. background: none;
  206. &:backdrop { color: $backdrop_fg_color; }
  207. opacity: 0; // non spinning spinner makes no sense
  208. -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
  209. &:checked {
  210. opacity: 1;
  211. animation: spin 1s linear infinite;
  212. &:disabled { opacity: 0.5; }
  213. }
  214. }
  215. /**********************
  216. * General Typography *
  217. **********************/
  218. .large-title {
  219. font-weight: 300;
  220. font-size: 24pt;
  221. }
  222. .title-1 {
  223. font-weight: 800;
  224. font-size: 20pt;
  225. }
  226. .title-2 {
  227. font-weight: 800;
  228. font-size: 15pt;
  229. }
  230. .title-3 {
  231. font-weight: 700;
  232. font-size: 15pt;
  233. }
  234. .title-4 {
  235. font-weight: 700;
  236. font-size: 13pt;
  237. }
  238. .heading {
  239. font-weight: 700;
  240. font-size: 11pt;
  241. }
  242. .body {
  243. font-weight: 400;
  244. font-size: 11pt;
  245. }
  246. .caption-heading {
  247. font-weight: 700;
  248. font-size: 9pt;
  249. }
  250. .caption {
  251. font-weight: 400;
  252. font-size: 9pt;
  253. }
  254. /****************
  255. * Text Entries *
  256. ****************/
  257. %entry,
  258. entry {
  259. %entry_basic, & {
  260. min-height: $_entry_height;
  261. padding-left: 8px;
  262. padding-right: 8px;
  263. border: 1px solid;
  264. border-radius: $button_radius;
  265. transition: all 200ms $ease-out-quad;
  266. @include entry(normal);
  267. image { // icons inside the entry
  268. &.left { margin-right: 6px; }
  269. &.right { margin-left: 6px; }
  270. }
  271. &.flat {
  272. &:focus, &:backdrop, &:disabled, &:backdrop:disabled, & {
  273. min-height: 0;
  274. padding: 2px;
  275. background-color: transparent;
  276. border-color: transparent;
  277. border-radius: 0;
  278. }
  279. }
  280. &:focus { @include entry(focus); }
  281. &:disabled { @include entry(insensitive); }
  282. &:backdrop {
  283. @include entry(backdrop);
  284. transition: $backdrop_transition;
  285. }
  286. &:backdrop:disabled { @include entry(backdrop-insensitive); }
  287. selection { @extend %selected_items; }
  288. // entry error and warning style
  289. @each $e_type, $e_color in (error, $error_color),
  290. (warning, $warning_color) {
  291. &.#{$e_type} {
  292. color: $e_color;
  293. border-color: entry_focus_border($e_color);
  294. &:focus { @include entry(focus, $e_color); }
  295. selection { background-color: $e_color; }
  296. }
  297. }
  298. image { // entry icons colors
  299. color: mix($fg_color, $base_color, 80%);
  300. &:hover { color: $fg_color; }
  301. &:active { color: $selected_bg_color; }
  302. &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 80%); }
  303. }
  304. &:drop(active) {
  305. &:focus, & {
  306. border-color: $drop_target_color;
  307. box-shadow: inset 0 0 0 1px $drop_target_color;
  308. }
  309. }
  310. .osd & {
  311. @include entry(osd);
  312. &:focus { @include entry(osd-focus); }
  313. &:backdrop { @include entry(osd-backdrop); }
  314. &:disabled { @include entry(osd-insensitive); }
  315. }
  316. }
  317. progress {
  318. margin: 2px -6px;
  319. background-color: transparent;
  320. background-image: none;
  321. border-radius: 0;
  322. border-width: 0 0 2px;
  323. border-color: $progress_bg_color;
  324. border-style: solid;
  325. box-shadow: none;
  326. &:backdrop { background-color: transparent; }
  327. }
  328. // linked entries
  329. .linked:not(.vertical) > & { @extend %linked; }
  330. .linked:not(.vertical) > &:focus + &,
  331. .linked:not(.vertical) > &:focus + button,
  332. .linked:not(.vertical) > &:focus + combobox > box > button.combo { border-left-color: entry_focus_border(); }
  333. .linked:not(.vertical) > &:focus.error + &,
  334. .linked:not(.vertical) > &:focus.error + button,
  335. .linked:not(.vertical) > &:focus.error + combobox > box > button.combo { border-left-color: entry_focus_border($error_color); }
  336. .linked:not(.vertical) > &:drop(active) + &,
  337. .linked:not(.vertical) > &:drop(active) + button,
  338. .linked:not(.vertical) > &:drop(active) + combobox > box > button.combo { border-left-color: $drop_target_color; }
  339. // Vertically linked entries
  340. // FIXME: take care of "colored" entries
  341. .linked.vertical > & {
  342. @extend %linked_vertical;
  343. // brighter border between linked entries
  344. &:not(:disabled) + entry:not(:disabled),
  345. &:not(:disabled) + %entry:not(:disabled) {
  346. border-top-color: mix($borders_color, $base_color, 30%);
  347. &:backdrop { border-top-color: mix($backdrop_borders_color, $backdrop_base_color, 30%); }
  348. }
  349. // brighter border between linked insensitive entries
  350. &:disabled + %entry:disabled,
  351. &:disabled + entry:disabled { border-top-color: mix($borders_color, $base_color, 30%); }
  352. // color back the top border of a linked focused entry following another entry.
  353. // :not(:only-child) is a specificity bump hack.
  354. + %entry:focus:not(:only-child),
  355. + entry:focus:not(:only-child) { border-top-color: entry_focus_border(); }
  356. + %entry:focus.error:not(:only-child),
  357. + entry:focus.error:not(:only-child) { border-top-color: entry_focus_border($error_color); }
  358. + %entry:drop(active):not(:only-child),
  359. + entry:drop(active):not(:only-child) { border-top-color: $drop_target_color; }
  360. // this takes care of coloring the top border of the focused entry subsequent widget.
  361. // :not(:only-child) is a specificity bump hack.
  362. &:focus:not(:only-child) {
  363. + %entry,
  364. + entry,
  365. + button,
  366. + combobox > box > button.combo { border-top-color: entry_focus_border(); }
  367. }
  368. &:focus.error:not(:only-child) {
  369. + %entry,
  370. + entry,
  371. + button,
  372. + combobox > box > button.combo { border-top-color: entry_focus_border($error_color); }
  373. }
  374. &:drop(active):not(:only-child) {
  375. + %entry,
  376. + entry,
  377. + button,
  378. + combobox > box > button.combo { border-top-color: $drop_target_color; }
  379. }
  380. }
  381. &.error { color: $error_color; }
  382. }
  383. treeview entry {
  384. &:focus {
  385. &:dir(rtl), &:dir(ltr) { // specificity bump hack
  386. background-color: $base_color;
  387. transition-property: color, background;
  388. }
  389. }
  390. &.flat, & {
  391. border-radius: 0;
  392. background-image: none;
  393. background-color: $base_color;
  394. &:focus { border-color: $selected_bg_color; }
  395. }
  396. }
  397. .entry-tag {
  398. // sizing
  399. padding: 5px;
  400. margin-top: 2px;
  401. margin-bottom: 2px;
  402. // side margins: compensate the entry padding with a negative margin
  403. // then the negative margin itself
  404. :dir(ltr) & {
  405. margin-left: 8px;
  406. margin-right: -5px;
  407. }
  408. :dir(rtl) & {
  409. margin-left: -5px;
  410. margin-right: 8px;
  411. }
  412. border-style: none;
  413. $_entry_tag_color: if($variant=='light', $selected_fg_color, $base_color);
  414. color: $_entry_tag_color;
  415. $_entry_tag_bg: if($variant=='light', $selected_bg_color, mix($fg_color, $base_color, 50%));
  416. background-color: $_entry_tag_bg;
  417. &:hover {
  418. background-color: lighten($_entry_tag_bg, 10%);
  419. }
  420. :backdrop & {
  421. color: $backdrop_base_color;
  422. background-color: if($variant=='light', $selected_bg_color,
  423. mix($backdrop_fg_color, $backdrop_base_color, 50%));
  424. }
  425. &.button {
  426. background-color: transparent;
  427. color: transparentize($_entry_tag_color, 0.3);
  428. }
  429. :not(:backdrop) &.button {
  430. &:hover {
  431. border: 1px solid $_entry_tag_bg;
  432. color: $_entry_tag_color;
  433. }
  434. &:active {
  435. background-color: $_entry_tag_bg;
  436. color: transparentize($_entry_tag_color, 0.3);
  437. }
  438. }
  439. }
  440. /***********
  441. * Buttons *
  442. ***********/
  443. // stuff for .needs-attention
  444. $_dot_color: if($variant=='light', $selected_bg_color,
  445. lighten($selected_bg_color,15%));
  446. @keyframes needs_attention {
  447. from {
  448. background-image: -gtk-gradient(radial,
  449. center center, 0,
  450. center center, 0.01,
  451. to($_dot_color),
  452. to(transparent));
  453. }
  454. to {
  455. background-image: -gtk-gradient(radial,
  456. center center, 0,
  457. center center, 0.5,
  458. to($selected_bg_color),
  459. to(transparent));
  460. }
  461. }
  462. %button,
  463. button {
  464. @at-root %button_basic, & {
  465. min-height: 24px;
  466. min-width: 16px;
  467. padding: $_btn_pad;
  468. border: 1px solid;
  469. border-radius: $button_radius;
  470. transition: $button_transition;
  471. @include button(normal);
  472. @at-root %button_basic_flat,
  473. &.flat {
  474. @include button(undecorated);
  475. // to avoid adiacent buttons borders clashing when transitioning, the transition on the normal state is set
  476. // to none, while it's added back in the hover state, so the button decoration will fade in on hover, but
  477. // it won't fade out when the pointer leave the button allocation area. To make the transition more evident
  478. // in this case the duration is increased.
  479. transition: none;
  480. &:hover {
  481. transition: $button_transition;
  482. transition-duration: 500ms;
  483. &:active { transition: $button_transition; }
  484. }
  485. }
  486. &:hover {
  487. @include button(hover);
  488. -gtk-icon-effect: highlight;
  489. }
  490. &:active,
  491. &:checked {
  492. @include button(active);
  493. transition-duration: 50ms;
  494. }
  495. &:backdrop {
  496. &.flat, & {
  497. @include button(backdrop);
  498. transition: $backdrop_transition;
  499. -gtk-icon-effect: none;
  500. &:active,
  501. &:checked { @include button(backdrop-active); }
  502. &:disabled {
  503. @include button(backdrop-insensitive);
  504. &:active,
  505. &:checked { @include button(backdrop-insensitive-active); }
  506. }
  507. }
  508. }
  509. @at-root %button_basic_flat,
  510. &.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
  511. &:disabled {
  512. @include button(insensitive);
  513. &:active,
  514. &:checked { @include button(insensitive-active); }
  515. }
  516. &.image-button {
  517. min-width: 24px;
  518. padding-left: $_img_btn_pad;
  519. padding-right: $_img_btn_pad;
  520. }
  521. &.text-button {
  522. padding-left: 16px;
  523. padding-right: 16px;
  524. }
  525. &.text-button.image-button {
  526. padding-left: 8px;
  527. padding-right: 8px;
  528. label {
  529. padding-left: 8px;
  530. padding-right: 8px;
  531. }
  532. }
  533. @at-root %button_basic_drop_active,
  534. &:drop(active) {
  535. color: $drop_target_color;
  536. border-color: $drop_target_color;
  537. box-shadow: inset 0 0 0 1px $drop_target_color;
  538. }
  539. }
  540. @at-root %button_selected, & {
  541. row:selected & {
  542. @if $variant == 'light' { border-color: $selected_borders_color; }
  543. }
  544. @at-root %button_selected_flat, &.flat {
  545. row:selected & {
  546. &:not(:active):not(:checked):not(:hover):not(disabled) {
  547. color: $selected_fg_color;
  548. border-color: transparent;
  549. &:backdrop { color: if($variant=='light', $backdrop_base_color, $backdrop_fg_color); }
  550. }
  551. }
  552. }
  553. }
  554. // big standalone buttons like in Documents pager
  555. &.osd {
  556. min-width: 26px;
  557. min-height: 32px;
  558. &.image-button { min-width: 34px; }
  559. color: $osd_fg_color;
  560. border-radius: 5px;
  561. @include button(osd);
  562. border: none;
  563. box-shadow: none;
  564. &:hover {
  565. @include button(osd-hover);
  566. border: none;
  567. box-shadow: none;
  568. }
  569. &:active,
  570. &:checked {
  571. @include button(osd-active);
  572. border: none;
  573. box-shadow: none;
  574. }
  575. &:disabled {
  576. &:backdrop, & {
  577. @include button(osd-insensitive);
  578. border: none;
  579. }
  580. }
  581. &:backdrop {
  582. @include button(osd-backdrop);
  583. border: none;
  584. }
  585. }
  586. //overlay / OSD style
  587. @at-root %osd_button,
  588. .osd & {
  589. @include button(osd);
  590. &:hover { @include button(osd-hover); }
  591. &:active,
  592. &:checked { &:backdrop, & { @include button(osd-active); }}
  593. &:disabled { &:backdrop, & { @include button(osd-insensitive); }}
  594. &:backdrop { @include button(osd-backdrop); }
  595. &.flat {
  596. @include button(undecorated);
  597. box-shadow: none; //FIXME respect no edge on the button mixin
  598. text-shadow: 0 1px black;
  599. -gtk-icon-shadow: 0 1px black;
  600. &:hover { @include button(osd-hover); }
  601. &:disabled {
  602. @include button(osd-insensitive);
  603. background-image: none;
  604. border-color: transparent;
  605. box-shadow: none;
  606. }
  607. &:backdrop { @include button(undecorated); }
  608. &:active,
  609. &:checked { @include button(osd-active); }
  610. }
  611. }
  612. // Suggested and Destructive Action buttons
  613. @each $b_type, $b_color in (suggested-action, $suggested_bg_color),
  614. (destructive-action, $destructive_color) {
  615. &.#{$b_type} {
  616. @include button(normal, $b_color, white);
  617. &.flat {
  618. @include button(undecorated);
  619. color: $b_color; //FIXME: does it work on the dark variant?
  620. }
  621. &:hover { @include button(hover, $b_color, white); }
  622. &:active,
  623. &:checked { @include button(active, $b_color, white); }
  624. &:backdrop,
  625. &.flat:backdrop {
  626. @include button(backdrop, $b_color, white);
  627. &:active,
  628. &:checked { @include button(backdrop-active, $b_color, white); }
  629. &:disabled {
  630. @include button(backdrop-insensitive);
  631. &:active,
  632. &:checked { @include button(backdrop-insensitive-active, $b_color, white); }
  633. }
  634. }
  635. &.flat {
  636. &:backdrop, &:disabled, &:backdrop:disabled {
  637. @include button(undecorated);
  638. color: transparentize($b_color, 0.2);
  639. }
  640. }
  641. &:disabled {
  642. @include button(insensitive);
  643. &:active,
  644. &:checked { @include button(insensitive-active, $b_color, white); }
  645. }
  646. .osd & {
  647. @include button(osd, $b_color);
  648. &:hover { @include button(osd-hover, $b_color); }
  649. &:active,
  650. &:checked { &:backdrop, & { @include button(osd-active, $b_color); }}
  651. &:disabled { &:backdrop, & { @include button(osd-insensitive, $b_color); }}
  652. &:backdrop { @include button(osd-backdrop, $b_color); }
  653. }
  654. }
  655. }
  656. .stack-switcher > & {
  657. // to position the needs attention dot, padding is added to the button
  658. // child, a label needs just lateral padding while an icon needs vertical
  659. // padding added too.
  660. outline-offset: -3px; // needs to be set or it gets overriden by GtkRadioButton outline-offset
  661. > label {
  662. padding-left: 6px; // label padding
  663. padding-right: 6px; //
  664. }
  665. > image {
  666. padding-left: 6px; // image padding
  667. padding-right: 6px; //
  668. padding-top: 3px; //
  669. padding-bottom: 3px; //
  670. }
  671. &.text-button {
  672. // compensate text-button paddings
  673. padding-left: 10px;
  674. padding-right: 10px;
  675. }
  676. &.image-button {
  677. // we want image buttons to have a 1:1 aspect ratio, so compensation
  678. // of the padding added to the GtkImage is needed
  679. padding-left: 2px;
  680. padding-right: 2px;
  681. }
  682. &.needs-attention {
  683. > label,
  684. > image { @extend %needs_attention; }
  685. &:active,
  686. &:checked {
  687. > label,
  688. > image {
  689. animation: none;
  690. background-image: none;
  691. }
  692. }
  693. }
  694. }
  695. // hide separators
  696. &.font,
  697. &.file { separator { background-color: transparent; }}
  698. &.font { > box > box > label { font-weight: bold; }}
  699. // inline-toolbar buttons
  700. .inline-toolbar & { @extend %linked; }
  701. .primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
  702. .linked > & { @extend %linked; }
  703. .linked.vertical > & { @extend %linked_vertical; }
  704. &.circular { // The Bloody Circul Button
  705. border-radius: 9999px;
  706. -gtk-outline-radius: 9999px;
  707. padding: $_circ_btn_pad; /* circles instead of ellipses */
  708. label { padding: 0; }
  709. // the followind code is needed since we use a darker bottom border on buttons, which looks pretty
  710. // bad with a 100% border radius (see https://bugzilla.gnome.org/show_bug.cgi?id=771205 for details),
  711. // so on relevant states we an additional background-image with a gradient clipped on the border-box,
  712. // so setting a transparent border would reveal it.
  713. $_border_bg: linear-gradient(to top, $alt-borders-color 25%, $borders-color 50%);
  714. &:not(.flat):not(.osd):not(:checked):not(:active):not(:disabled):not(:backdrop) {
  715. @include button(normal, $backimage: $_border_bg);
  716. border-color: transparent;
  717. }
  718. &:hover:not(.osd):not(:checked):not(:active):not(:disabled):not(:backdrop) {
  719. @include button(hover, $backimage: $_border_bg);
  720. border-color: transparent;
  721. }
  722. background-origin: padding-box, border-box;
  723. background-clip: padding-box, border-box;
  724. }
  725. }
  726. %needs_attention {
  727. animation: needs_attention 150ms ease-in;
  728. $_dot_shadow: _text_shadow_color();
  729. $_dot_shadow_r: if($variant=='light',0.5,0.45);
  730. background-image: -gtk-gradient(radial,
  731. center center, 0,
  732. center center, 0.5,
  733. to($_dot_color),
  734. to(transparent)),
  735. -gtk-gradient(radial,
  736. center center, 0,
  737. center center, $_dot_shadow_r,
  738. to($_dot_shadow),
  739. to(transparent));
  740. background-size: 6px 6px, 6px 6px;
  741. background-repeat: no-repeat;
  742. @if $variant == 'light' { background-position: right 3px, right 4px; }
  743. @else { background-position: right 3px, right 2px; }
  744. &:backdrop { background-size: 6px 6px, 0 0;}
  745. &:dir(rtl) {
  746. @if $variant == 'light' { background-position: left 3px, left 4px; }
  747. @else { background-position: left 3px, left 2px; }
  748. }
  749. }
  750. // all the following is for the +|- buttons on inline toolbars, that way
  751. // should really be deprecated...
  752. .inline-toolbar toolbutton > button { // redefining the button look is
  753. // needed since those are flat...
  754. @include button(normal);
  755. &:hover { @include button(hover); }
  756. &:active,
  757. &:checked{ @include button(active); }
  758. &:disabled {
  759. @include button(insensitive);
  760. &:active,
  761. &:checked { @include button(insensitive-active); }
  762. }
  763. &:backdrop {
  764. @include button(backdrop);
  765. &:active,
  766. &:checked { @include button(backdrop-active); }
  767. &:disabled {
  768. @include button(backdrop-insensitive);
  769. &:active,
  770. &:checked { @include button(backdrop-insensitive-active); }
  771. }
  772. }
  773. }
  774. // More inline toolbar buttons
  775. toolbar.inline-toolbar toolbutton {
  776. > button.flat { @extend %linked_middle; }
  777. &:first-child > button.flat { @extend %linked_left; }
  778. &:last-child > button.flat { @extend %linked_right; }
  779. &:only-child > button.flat { @extend %linked_only_child; }
  780. }
  781. %linked_middle {
  782. border-right-style: none;
  783. border-radius: 0;
  784. -gtk-outline-radius: 0;
  785. }
  786. %linked_left {
  787. border-top-left-radius: $button_radius;
  788. border-bottom-left-radius: $button_radius;
  789. -gtk-outline-top-left-radius: $button_radius;
  790. -gtk-outline-bottom-left-radius: $button_radius;
  791. }
  792. %linked_right {
  793. border-right-style: solid;
  794. border-top-right-radius: $button_radius;
  795. border-bottom-right-radius: $button_radius;
  796. -gtk-outline-top-right-radius: $button_radius;
  797. -gtk-outline-bottom-right-radius: $button_radius;
  798. }
  799. %linked_only_child {
  800. border-style: solid;
  801. border-radius: $button_radius;
  802. -gtk-outline-radius: $button_radius;
  803. }
  804. // .linked assumes Box, which reverses nodes in RTL, so 1st child is always left
  805. %linked {
  806. @extend %linked_middle;
  807. &:first-child { @extend %linked_left; }
  808. &:last-child { @extend %linked_right; }
  809. &:only-child { @extend %linked_only_child; }
  810. }
  811. // Other widgets use widget child order, so 1st/last child are at text start/end
  812. %linked_flippable {
  813. @extend %linked_middle;
  814. &:dir(ltr) {
  815. &:first-child { @extend %linked_left; }
  816. &:last-child { @extend %linked_right; }
  817. }
  818. &:dir(rtl) {
  819. &:first-child { @extend %linked_right; }
  820. &:last-child { @extend %linked_left; }
  821. }
  822. &:only-child { @extend %linked_only_child; }
  823. }
  824. %linked_vertical_middle {
  825. border-style: solid solid none solid;
  826. border-radius: 0;
  827. -gtk-outline-radius: 0;
  828. }
  829. %linked_vertical_top {
  830. border-top-left-radius: $button_radius;
  831. border-top-right-radius: $button_radius;
  832. -gtk-outline-top-left-radius: $button_radius;
  833. -gtk-outline-top-right-radius: $button_radius;
  834. }
  835. %linked_vertical_bottom {
  836. border-bottom-style: solid;
  837. border-bottom-left-radius: $button_radius;
  838. border-bottom-right-radius: $button_radius;
  839. -gtk-outline-bottom-left-radius: $button_radius;
  840. -gtk-outline-bottom-right-radius: $button_radius;
  841. }
  842. %linked_vertical_only_child {
  843. border-style: solid;
  844. border-radius: $button_radius;
  845. -gtk-outline-radius: $button_radius;
  846. }
  847. %linked_vertical {
  848. @extend %linked_vertical_middle;
  849. &:first-child { @extend %linked_vertical_top; }
  850. &:last-child { @extend %linked_vertical_bottom; }
  851. &:only-child { @extend %linked_vertical_only_child; }
  852. }
  853. %undecorated_button {
  854. background-color: transparent;
  855. background-image: none;
  856. border-color: transparent;
  857. box-shadow: inset 0 1px transparentize(white, 1),
  858. 0 1px transparentize(white, 1);
  859. text-shadow: none;
  860. -gtk-icon-shadow: none;
  861. }
  862. /* menu buttons */
  863. modelbutton.flat,
  864. .menuitem.button.flat {
  865. min-height: 26px;
  866. padding-left: 5px;
  867. padding-right: 5px;
  868. border-radius: $button_radius;
  869. outline-offset: -2px;
  870. @extend %undecorated_button;
  871. &:hover { background-color: $popover_hover_color; }
  872. &:selected { @extend %selected_items; }
  873. &:backdrop,
  874. &:backdrop:hover { @extend %undecorated_button; }
  875. }
  876. modelbutton.flat arrow {
  877. background: none;
  878. &:hover { background: none; }
  879. &.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
  880. &.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
  881. }
  882. button.color {
  883. padding: 4px;
  884. colorswatch:only-child {
  885. &, overlay { border-radius: 0; }
  886. @if $variant == 'light' {
  887. box-shadow: 0 1px _text_shadow_color();
  888. .osd & { box-shadow: none; }
  889. }
  890. }
  891. @if $variant == 'light' {
  892. .osd &, & {
  893. &:disabled,
  894. &:backdrop,
  895. &:active,
  896. &:checked { colorswatch:only-child { box-shadow: none; }}
  897. }
  898. }
  899. }
  900. /* list buttons */
  901. /* tone down as per new designs, see issue #1473, #1748 */
  902. list row button.image-button:not(.flat) {
  903. @extend %undecorated_button;
  904. border: 1px solid transparentize($borders_color, .5);
  905. &:hover { @include button(hover); }
  906. &:active,
  907. &:checked { @include button(active); }
  908. }
  909. /*********
  910. * Links *
  911. *********/
  912. %link,
  913. *:link {
  914. color: $link_color;
  915. &:visited {
  916. color: $link_visited_color;
  917. *:selected & { color: mix($selected_fg_color, $link_visited_color, 60%); }
  918. }
  919. &:hover {
  920. $_fg: lighten($link_color, 10%);
  921. color: $_fg;
  922. *:selected & { color: mix($selected_fg_color, $_fg, 90%); }
  923. }
  924. &:active {
  925. color: $link_color;
  926. *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
  927. }
  928. &:disabled, &:disabled:backdrop { color: transparentize(desaturate($link_color, 100%), 0.2); }
  929. &:backdrop { &:backdrop:hover, &:backdrop:hover:selected, & { color: transparentize($link_color, 0.1); }}
  930. @at-root %link_selected,
  931. &:selected,
  932. *:selected & { color: mix($selected_fg_color, $link_color, 80%); }
  933. }
  934. button:link,
  935. button:visited {
  936. @extend %undecorated_button;
  937. @extend %link;
  938. text-shadow: none;
  939. &:hover,
  940. &:active,
  941. &:checked {
  942. @extend %undecorated_button;
  943. text-shadow: none;
  944. }
  945. > label {
  946. @extend %link;
  947. text-decoration-line: underline;
  948. }
  949. }
  950. /*****************
  951. * GtkSpinButton *
  952. *****************/
  953. spinbutton {
  954. &:not(.vertical) {
  955. // in this horizontal configuration, the whole spinbutton
  956. // behaves as the entry, so we extend the entry styling
  957. // and nuke the style on the internal entry
  958. @extend %entry;
  959. padding: 0;
  960. %spinbutton_horz_entry {
  961. min-width: 28px;
  962. // reset all the other props since the spinbutton node is styled here
  963. margin: 0;
  964. background: none;
  965. background-color: transparent;
  966. border: none;
  967. border-radius: 0;
  968. box-shadow: none;
  969. &:backdrop:disabled { background-color: transparent; }
  970. }
  971. entry {
  972. @extend %spinbutton_horz_entry;
  973. }
  974. button {
  975. min-height: 16px;
  976. margin: 0;
  977. padding-bottom: 0;
  978. padding-top: 0;
  979. color: mix($fg_color, $base_color, 90%);
  980. background-image: none;
  981. border-style: none none none solid;
  982. border-color: transparentize($borders_color, 0.7);
  983. border-radius: 0;
  984. box-shadow: none;
  985. &:dir(rtl) { border-style: none solid none none; }
  986. &:hover {
  987. color: $fg_color;
  988. background-color: $base_hover_color;
  989. }
  990. &:disabled {
  991. color: transparentize($insensitive_fg_color, 0.7);
  992. background-color: transparent;
  993. }
  994. &:active {
  995. background-color: transparentize(black, 0.9);
  996. box-shadow: inset 0 2px 3px -1px transparentize(black, 0.8);
  997. }
  998. &:backdrop {
  999. color: mix($backdrop_fg_color, $backdrop_base_color, 90%);
  1000. background-color: transparent;
  1001. border-color: transparentize($backdrop_borders_color, 0.7);
  1002. transition: $backdrop_transition;
  1003. }
  1004. &:backdrop:disabled {
  1005. color: transparentize($backdrop_insensitive_color,0.7);
  1006. background-color: transparent;
  1007. background-image: none;
  1008. border-style: none none none solid; // It is needed or it gets overridden
  1009. &:dir(rtl) { border-style: none solid none none; }
  1010. }
  1011. &:dir(ltr):last-child { border-radius: 0 $button_radius $button_radius 0; }
  1012. &:dir(rtl):first-child { border-radius: $button_radius 0 0 $button_radius; }
  1013. }
  1014. }
  1015. // OSD horizontal
  1016. .osd &:not(.vertical) {
  1017. entry {
  1018. @extend %spinbutton_horz_entry;
  1019. }
  1020. button {
  1021. @include button(undecorated);
  1022. color: $osd_fg_color;
  1023. border-style: none none none solid;
  1024. border-color: transparentize($osd_borders_color, 0.3);
  1025. border-radius: 0;
  1026. box-shadow: none;
  1027. -gtk-icon-shadow: 0 1px black;
  1028. &:dir(rtl) { border-style: none solid none none; }
  1029. &:hover {
  1030. @include button(undecorated);
  1031. color: $osd_fg_color;
  1032. border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
  1033. background-color: transparentize($osd_fg_color, 0.9);
  1034. -gtk-icon-shadow: 0 1px black;
  1035. box-shadow: none;
  1036. }
  1037. &:backdrop {
  1038. @include button(undecorated);
  1039. color: $osd_fg_color;
  1040. border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
  1041. -gtk-icon-shadow: none;
  1042. box-shadow: none;
  1043. }
  1044. &:disabled {
  1045. @include button(undecorated);
  1046. color: $osd_insensitive_fg_color;
  1047. border-color: transparentize(opacify($osd_borders_color, 1), 0.5);
  1048. -gtk-icon-shadow: none;
  1049. box-shadow: none;
  1050. }
  1051. &:dir(ltr):last-child { border-radius: 0 $button_radius $button_radius 0; }
  1052. &:dir(rtl):first-child { border-radius: $button_radius 0 0 $button_radius; }
  1053. }
  1054. }
  1055. // Vertical
  1056. &.vertical {
  1057. // in the vertical configuration, we treat the spinbutton
  1058. // as a box, and tweak the style of the entry in the middle
  1059. // so that it's linked
  1060. // FIXME: this should not be set at all, but otherwise it gets the wrong
  1061. // color
  1062. &:disabled { color: $insensitive_fg_color; }
  1063. &:backdrop:disabled { color: $backdrop_insensitive_color; }
  1064. &:drop(active) {
  1065. border-color: transparent;
  1066. box-shadow: none;
  1067. }
  1068. entry {
  1069. min-height: 32px;
  1070. min-width: 32px;
  1071. padding: 0;
  1072. border-radius: 0;
  1073. }
  1074. button {
  1075. min-height: 32px;
  1076. min-width: 32px;
  1077. padding: 0;
  1078. &.up { @extend %top_button; }
  1079. &.down { @extend %bottom_button; }
  1080. }
  1081. %top_button {
  1082. border-radius: $button_radius $button_radius 0 0;
  1083. border-style: solid solid none solid;
  1084. }
  1085. %bottom_button {
  1086. border-radius: 0 0 $button_radius $button_radius;
  1087. border-style: none solid solid solid;
  1088. }
  1089. }
  1090. // OSD vertical
  1091. .osd &.vertical button:first-child {
  1092. @include button(osd);
  1093. &:hover { @include button(osd-hover);}
  1094. &:active { @include button(osd-active); }
  1095. &:disabled { @include button(osd-insensitive); }
  1096. &:backdrop { @include button(osd-backdrop); }
  1097. }
  1098. // Misc
  1099. treeview &:not(.vertical) {
  1100. min-height: 0;
  1101. border-style: none;
  1102. border-radius: 0;
  1103. entry {
  1104. min-height: 0;
  1105. padding: 1px 2px;
  1106. }
  1107. }
  1108. font-feature-settings: "tnum";
  1109. }
  1110. /**************
  1111. * ComboBoxes *
  1112. **************/
  1113. combobox {
  1114. arrow {
  1115. -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
  1116. min-height: 16px;
  1117. min-width: 16px;
  1118. }
  1119. &.linked {
  1120. button:nth-child(2) {
  1121. &:dir(ltr) { @extend %linked_right; }
  1122. &:dir(rtl) { @extend %linked_left; }
  1123. }
  1124. }
  1125. &:drop(active) { // FIXME: untested
  1126. box-shadow: none;
  1127. button.combo { @extend %button_basic_drop_active; }
  1128. }
  1129. }
  1130. // the combo is a composite widget so the way we do button linking doesn't
  1131. // work, special case needed. See
  1132. // https://bugzilla.gnome.org/show_bug.cgi?id=733979
  1133. .linked:not(.vertical) > combobox > box > button.combo { @extend %linked_middle; }
  1134. .linked:not(.vertical) > combobox:first-child > box > button.combo { @extend %linked_left; }
  1135. .linked:not(.vertical) > combobox:last-child > box > button.combo { @extend %linked_right; }
  1136. .linked:not(.vertical) > combobox:only-child > box > button.combo { @extend %linked_only_child; }
  1137. .linked.vertical > combobox > box > button.combo { @extend %linked_vertical_middle; }
  1138. .linked.vertical > combobox:first-child > box > button.combo { @extend %linked_vertical_top; }
  1139. .linked.vertical > combobox:last-child > box > button.combo { @extend %linked_vertical_bottom; }
  1140. .linked.vertical > combobox:only-child > box > button.combo { @extend %linked_vertical_only_child; }
  1141. /************
  1142. * Toolbars *
  1143. ************/
  1144. %toolbar {
  1145. -GtkWidget-window-dragging: true;
  1146. padding: 4px;
  1147. background-color: $bg_color;
  1148. }
  1149. toolbar {
  1150. @extend %toolbar;
  1151. padding: 4px 3px 3px 4px;
  1152. // on OSD
  1153. .osd & { background-color: transparent; }
  1154. // stand-alone OSD toolbars
  1155. &.osd {
  1156. padding: 13px;
  1157. border: none;
  1158. border-radius: 5px;
  1159. background-color: $osd_bg_color;
  1160. &.left,
  1161. &.right,
  1162. &.top,
  1163. &.bottom { border-radius: 0; } // positional classes for `attached` osd toolbars
  1164. }
  1165. // toolbar separators
  1166. &.horizontal separator { margin: 0 7px 1px 6px; }
  1167. &.vertical separator { margin: 6px 1px 7px 0; }
  1168. &:not(.inline-toolbar):not(.osd) {
  1169. // workaround: add margins to the children of tool items to simulate
  1170. // spacing, ignore the overflow button (.toggle) and the overflow menu
  1171. // (.popup)
  1172. > *:not(.toggle):not(.popup) > * {
  1173. margin-right: 1px;
  1174. margin-bottom: 1px;
  1175. }
  1176. }
  1177. }
  1178. //searchbar, location-bar & inline-toolbar
  1179. .inline-toolbar {
  1180. @extend %toolbar;
  1181. @extend %darkbar;
  1182. padding: 3px;
  1183. border-width: 0 1px 1px;
  1184. border-radius: 0 0 5px 5px;
  1185. }
  1186. searchbar > revealer > box,
  1187. .location-bar {
  1188. @extend %toolbar;
  1189. @extend %darkbar;
  1190. border-width: 0 0 1px;
  1191. padding: 3px;
  1192. }
  1193. searchbar > revealer > box {
  1194. // workaround: undo the GtkContainer:border-width and use CSS padding instead
  1195. margin: -6px;
  1196. padding: 6px;
  1197. }
  1198. %darkbar {
  1199. border-style: solid;
  1200. border-color: $borders_color;
  1201. $_bg: mix($bg_color, $borders_color, 70%);
  1202. background-color: $_bg;
  1203. &:backdrop {
  1204. border-color: $backdrop_borders_color;
  1205. background-color: $backdrop_dark_fill;
  1206. box-shadow: none;
  1207. transition: $backdrop_transition;
  1208. }
  1209. }
  1210. /***************
  1211. * Header bars *
  1212. ***************/
  1213. %titlebar,
  1214. headerbar {
  1215. padding: 0 6px;
  1216. min-height: $_headerbar_height;
  1217. border-width: 0 0 1px;
  1218. border-style: solid;
  1219. border-color: $alt_borders_color;
  1220. border-radius: 0;
  1221. @include headerbar_fill(darken($bg_color, 10%));
  1222. &:backdrop {
  1223. border-color: $backdrop_borders_color;
  1224. background-color: $bg_color;
  1225. background-image: none;
  1226. box-shadow: inset 0 1px $top_hilight;
  1227. transition: $backdrop_transition;
  1228. }
  1229. .title {
  1230. padding-left: 12px;
  1231. padding-right: 12px;
  1232. font-weight: bold;
  1233. }
  1234. .subtitle {
  1235. font-size: smaller;
  1236. padding-left: 12px;
  1237. padding-right: 12px;
  1238. @extend .dim-label;
  1239. }
  1240. /* Darken switchbuttons for headerbars. issue #1588 */
  1241. stackswitcher button:checked,
  1242. button.toggle:checked {
  1243. background: if($variant == 'light', image(darken($bg_color, 17%)), image(darken($bg_color, 9%)));
  1244. border-color: darken($borders_color, 3%);
  1245. border-top-color: darken($borders_color, 8%);
  1246. &:backdrop {
  1247. @include button(backdrop-active);
  1248. }
  1249. }
  1250. .selection-mode &,
  1251. &.selection-mode {
  1252. $_hc: mix($top_hilight, $suggested_bg_color, 50%); // hilight color
  1253. color: $selected_fg_color;
  1254. border-color: $suggested_border_color;
  1255. text-shadow: 0 -1px transparentize(black, 0.5);
  1256. @include headerbar_fill($suggested_bg_color, $_hc);
  1257. &:backdrop {
  1258. background-color: $suggested_bg_color;
  1259. background-image: none;
  1260. box-shadow: inset 0 1px mix($top_hilight, $suggested_bg_color, 60%);
  1261. label {
  1262. text-shadow: none;
  1263. color: $selected_fg_color;
  1264. }
  1265. }
  1266. .subtitle:link { @extend %link_selected; }
  1267. button {
  1268. @include button(normal, $suggested_bg_color, $selected_fg_color);
  1269. @at-root %selection_mode_button_flat,
  1270. &.flat { @include button(undecorated); }
  1271. &:hover { @include button(hover, $suggested_bg_color, $selected_fg_color); }
  1272. &:active,
  1273. &:checked,
  1274. &.toggle:checked,
  1275. &.toggle:active { @include button(active, $suggested_bg_color, $selected_fg_color); }
  1276. &:backdrop {
  1277. &.flat, & {
  1278. @include button(backdrop, $suggested_bg_color, $selected_fg_color);
  1279. -gtk-icon-effect: none;
  1280. border-color: $suggested_border_color;
  1281. &:active,
  1282. &:checked {
  1283. @include button(backdrop-active, $suggested_bg_color, $selected_fg_color);
  1284. border-color: $suggested_border_color;
  1285. }
  1286. &:disabled {
  1287. @include button(backdrop-insensitive, $suggested_bg_color, $selected_fg_color);
  1288. border-color: $suggested_border_color;
  1289. &:active, &:checked {
  1290. @include button(backdrop-insensitive-active, $suggested_bg_color, $selected_fg_color);
  1291. border-color: $suggested_border_color;
  1292. }
  1293. }
  1294. }
  1295. }
  1296. @at-root %selection_mode_button_flat,
  1297. &.flat { &:backdrop, &:disabled, &:backdrop:disabled { @include button(undecorated); }}
  1298. &:disabled {
  1299. @include button(insensitive, $suggested_bg_color, $selected_fg_color);
  1300. &:active,
  1301. &:checked { @include button(insensitive-active, $suggested_bg_color, $selected_fg_color); }
  1302. }
  1303. &.suggested-action {
  1304. @include button(normal);
  1305. border-color: $suggested_border_color;
  1306. &:hover {
  1307. @include button(hover);
  1308. border-color: $suggested_border_color;
  1309. }
  1310. &:active {
  1311. @include button(active);
  1312. border-color: $suggested_border_color;
  1313. }
  1314. &:disabled {
  1315. @include button(insensitive);
  1316. border-color: $suggested_border_color;
  1317. }
  1318. &:backdrop {
  1319. @include button(backdrop);
  1320. border-color: $suggested_border_color;
  1321. }
  1322. &:backdrop:disabled {
  1323. @include button(backdrop-insensitive);
  1324. border-color: $suggested_border_color;
  1325. }
  1326. }
  1327. }
  1328. .selection-menu {
  1329. &:backdrop, & {
  1330. border-color: transparentize($suggested_bg_color, 1);
  1331. background-color: transparentize($suggested_bg_color, 1);
  1332. background-image: none;
  1333. box-shadow: none;
  1334. min-height: 20px;
  1335. padding: $_sel_menu_pad;
  1336. arrow { -GtkArrow-arrow-scaling: 1; }
  1337. .arrow {
  1338. -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
  1339. color: transparentize($selected_fg_color,0.5);
  1340. -gtk-icon-shadow: none;
  1341. }
  1342. }
  1343. }
  1344. }
  1345. // squared corners when the window is maximized, tiled, or fullscreen
  1346. .tiled &,
  1347. .tiled-top &,
  1348. .tiled-right &,
  1349. .tiled-bottom &,
  1350. .tiled-left &,
  1351. .maximized &,
  1352. .fullscreen & {
  1353. &:backdrop, & {
  1354. border-radius: 0;
  1355. }
  1356. }
  1357. &.default-decoration {
  1358. min-height: 28px;
  1359. padding: 4px;
  1360. button.titlebutton {
  1361. min-height: 26px;
  1362. min-width: 26px;
  1363. margin: 0;
  1364. padding: 0;
  1365. }
  1366. }
  1367. separator.titlebutton { opacity: 0; } /* hide the close button separator */
  1368. .solid-csd & {
  1369. &:backdrop, & {
  1370. &:dir(rtl), &:dir(ltr) { // specificity bump
  1371. margin-left: -1px;
  1372. margin-right: -1px;
  1373. margin-top: -1px;
  1374. border-radius: 0;
  1375. box-shadow: none;
  1376. }
  1377. }
  1378. }
  1379. }
  1380. headerbar {
  1381. // add vertical margins to common widget on the headerbar to avoid them spanning the whole height
  1382. entry,
  1383. spinbutton,
  1384. separator:not(.sidebar),
  1385. button {
  1386. margin-top: $_hb_btn_pad;
  1387. margin-bottom: $_hb_btn_pad;
  1388. }
  1389. switch {
  1390. margin-top: $_switch_margin;
  1391. margin-bottom: $_switch_margin;
  1392. }
  1393. &.titlebar headerbar:not(.titlebar) {
  1394. // Drop the background of non-titlebar nested headerbars. This is needed to
  1395. // work around headerbar sliding animation issues without refactoring
  1396. // Adwaita's support of titlebars and headerbars as it may break
  1397. // applications.
  1398. // See https://gitlab.gnome.org/GNOME/gtk/issues/1264 for more information.
  1399. background: none;
  1400. box-shadow: none;
  1401. }
  1402. }
  1403. .background .titlebar {
  1404. &:backdrop, & {
  1405. border-top-left-radius: $window_radius;
  1406. border-top-right-radius: $window_radius;
  1407. }
  1408. }
  1409. .background.tiled .titlebar,
  1410. .background.tiled-top .titlebar,
  1411. .background.tiled-right .titlebar,
  1412. .background.tiled-bottom .titlebar,
  1413. .background.tiled-left .titlebar,
  1414. .background.maximized .titlebar,
  1415. .background.solid-csd .titlebar {
  1416. &:backdrop, & {
  1417. border-top-left-radius: 0;
  1418. border-top-right-radius: 0;
  1419. }
  1420. }
  1421. headerbar { // headerbar border rounding
  1422. window separator:first-child + &,
  1423. window &:first-child { &:backdrop, & { border-top-left-radius: 7px; }}
  1424. window &:last-child { &:backdrop, & { border-top-right-radius: 7px; }}
  1425. window stack & { // tackles the stacked headerbars case
  1426. &:first-child, &:last-child {
  1427. &:backdrop, & {
  1428. border-top-left-radius: 7px;
  1429. border-top-right-radius: 7px;
  1430. }
  1431. }
  1432. }
  1433. window.tiled &,
  1434. window.tiled-top &,
  1435. window.tiled-right &,
  1436. window.tiled-bottom &,
  1437. window.tiled-left &,
  1438. window.maximized &,
  1439. window.fullscreen &,
  1440. window.solid-csd & {
  1441. &, &:backdrop {
  1442. &,
  1443. &:first-child,
  1444. &:last-child,
  1445. &:only-child {
  1446. border-top-left-radius: 0;
  1447. border-top-right-radius: 0;
  1448. }
  1449. }
  1450. }
  1451. }
  1452. .titlebar:not(headerbar) {
  1453. window.csd > & {
  1454. // in csd we assume every titlebar is a headerbar so reset anything, this is needed for split toolbars cases
  1455. padding: 0;
  1456. background-color: transparent;
  1457. background-image: none;
  1458. border-style: none;
  1459. border-color: transparent;
  1460. box-shadow: none;
  1461. }
  1462. separator { background-color: $borders_color; } // FIXME: use darker border?
  1463. @extend %titlebar;
  1464. }
  1465. // Development versions of apps to use a differently styled headerbar
  1466. window.devel {
  1467. headerbar.titlebar:not(.selection-mode) {
  1468. $c: darken($bg_color, 10%);
  1469. $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
  1470. linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.8)),
  1471. linear-gradient(to top, darken($c, 3%), $c 3px, lighten($c, 6%));
  1472. @if $variant == 'dark' {
  1473. $gradient: cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
  1474. linear-gradient(to right, transparent 65%, transparentize($selected_bg_color, 0.9)),
  1475. linear-gradient(to top, lighten($c, 3%) 3px, lighten($c, 5%));
  1476. }
  1477. background: $bg_color $gradient;
  1478. &:backdrop {
  1479. background: $bg_color cross-fade(10% -gtk-icontheme("system-run-symbolic"), image(transparent)) 90% 0/256px 256px no-repeat,
  1480. image($bg_color); /* background-color would flash */
  1481. }
  1482. }
  1483. }
  1484. /************
  1485. * Pathbars *
  1486. ************/
  1487. // GtkPathBar does not work with just .linked, so we must override that. But we
  1488. // can’t simply remove .linked from the widget as that might break other themes.
  1489. // Note also we select on filechooser to avoid interfering with NautilusPathBar.
  1490. filechooser .path-bar.linked > button {
  1491. @extend %linked_flippable;
  1492. }
  1493. .path-bar button {
  1494. &.text-button, &.image-button, & {
  1495. padding-left: 4px;
  1496. padding-right: 4px;
  1497. }
  1498. &.text-button.image-button label {
  1499. padding-left: 0;
  1500. padding-right: 0;
  1501. }
  1502. &.text-button.image-button, & {
  1503. label:last-child { padding-right: 8px; }
  1504. label:first-child { padding-left: 8px; }
  1505. }
  1506. image {
  1507. padding-left: 4px;
  1508. padding-right: 4px;
  1509. }
  1510. &.slider-button {
  1511. padding-left: 0;
  1512. padding-right: 0;
  1513. }
  1514. }
  1515. /**************
  1516. * Tree Views *
  1517. **************/
  1518. $_treeview_borders_color: if($variant=='light',mix($borders_color, $base_color,80%),mix($fg_color, $base_color, 20%));
  1519. treeview.view {
  1520. @at-root * {
  1521. -GtkTreeView-horizontal-separator: 4;
  1522. -GtkTreeView-grid-line-width: 1;
  1523. -GtkTreeView-grid-line-pattern: '';
  1524. -GtkTreeView-tree-line-width: 1;
  1525. -GtkTreeView-tree-line-pattern: '';
  1526. -GtkTreeView-expander-size: 16;
  1527. }
  1528. border-left-color: mix($fg_color, $base_color, 50%); // this is actually the tree lines color,
  1529. border-top-color: $bg_color; // while this is the grid lines color, better then nothing
  1530. rubberband { @extend rubberband; } // to avoid borders being overridden by the previously set props
  1531. &:selected {
  1532. &:focus, & {
  1533. border-radius: 0;
  1534. @extend %selected_items;
  1535. }
  1536. &:backdrop, & {
  1537. border-left-color: mix($selected_fg_color, $selected_bg_color, 50%);
  1538. border-top-color: transparentize($fg_color, 0.9); // doesn't work unfortunatelly
  1539. }
  1540. }
  1541. &:disabled {
  1542. color: $insensitive_fg_color;
  1543. &:selected {
  1544. color: mix($selected_fg_color, $selected_bg_color, 40%);
  1545. &:backdrop { color: mix($backdrop_selected_fg_color, $selected_bg_color, 30%); }
  1546. }
  1547. &:backdrop { color: $backdrop_insensitive_color; }
  1548. }
  1549. &.separator {
  1550. min-height: 2px;
  1551. color: $bg_color;
  1552. &:backdrop { color: transparentize($bg_color, 0.9); }
  1553. }
  1554. &:backdrop {
  1555. border-left-color: mix($backdrop_fg_color, $backdrop_bg_color, 50%);
  1556. border-top: $backdrop_bg_color;
  1557. }
  1558. &:drop(active) {
  1559. border-style: solid none;
  1560. border-width: 1px;
  1561. border-color: $selected_borders_color;
  1562. &.after { border-top-style: none; }
  1563. &.before { border-bottom-style: none; }
  1564. }
  1565. &.expander {
  1566. -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
  1567. &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
  1568. color: mix($text_color, $base_color, 70%);
  1569. &:hover { color: $text_color; }
  1570. &:selected {
  1571. color: mix($selected_fg_color, $selected_bg_color, 70%);
  1572. &:hover { color: $selected_fg_color; }
  1573. &:backdrop { color: mix($backdrop_selected_fg_color, $selected_bg_color, 70%); }
  1574. }
  1575. &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
  1576. &:backdrop { color: mix($backdrop_fg_color, $backdrop_base_color, 70%); }
  1577. }
  1578. &.progressbar { // progress bar in treeviews
  1579. @if $variant == light { color: $base_color; }
  1580. background-color: $progress_bg_color;
  1581. background-image: image($progress_bg_color);
  1582. box-shadow: none;
  1583. &:selected {
  1584. &:focus, & {
  1585. @if $variant == 'light' {
  1586. color: $selected_bg_color;
  1587. }
  1588. @else { box-shadow: inset 0 1px transparentize(white, 0.95); }
  1589. background-image: image($base_color);
  1590. &:backdrop {
  1591. @if $variant == 'light' {
  1592. color: $selected_bg_color;
  1593. }
  1594. background-color: $backdrop_base_color;
  1595. }
  1596. }
  1597. }
  1598. &:backdrop {
  1599. @if $variant == 'light' { color: $backdrop_base_color; }
  1600. @else { border-color: $backdrop_base_color; }
  1601. background-image: none;
  1602. box-shadow: none;
  1603. }
  1604. }
  1605. &.trough { // progress bar trough in treeviews
  1606. background-color: transparentize($fg_color,0.9);
  1607. &:selected {
  1608. &:focus, & {
  1609. background-color: if($variant == 'light',
  1610. transparentize($selected_fg_color, 0.7),
  1611. darken($selected_bg_color, 10%));
  1612. }
  1613. }
  1614. }
  1615. header {
  1616. button {
  1617. $_column_header_color: mix($fg_color, $base_color, 50%);
  1618. @extend %column_header_button;
  1619. color: $_column_header_color;
  1620. background-color: $base_color;
  1621. font-weight: bold;
  1622. text-shadow: none;
  1623. box-shadow: none;
  1624. &:hover {
  1625. @extend %column_header_button;
  1626. color: mix($_column_header_color, $fg_color, 50%);
  1627. box-shadow: none;
  1628. transition: none; //I shouldn't need this
  1629. }
  1630. &:active {
  1631. @extend %column_header_button;
  1632. color: $fg_color;
  1633. transition: none; //I shouldn't need this
  1634. }
  1635. }
  1636. }
  1637. button.dnd,
  1638. header.button.dnd { // for treeview-like derive widgets
  1639. &:active, &:selected, &:hover, & {
  1640. padding: 0 6px;
  1641. color: $base_color;
  1642. background-image: none;
  1643. background-color: $selected_bg_color;
  1644. border-style: none;
  1645. border-radius: 0;
  1646. box-shadow: inset 0 0 0 1px $base_color;
  1647. text-shadow: none;
  1648. transition: none;
  1649. }
  1650. }
  1651. acceleditor > label { background-color: $selected_bg_color; } // see tests/testaccel to test
  1652. }
  1653. %column_header_button {
  1654. padding: 0 6px;
  1655. background-image: none;
  1656. border-style: none solid solid none;
  1657. border-color: $_treeview_borders_color;
  1658. border-radius: 0;
  1659. text-shadow: none;
  1660. &:disabled {
  1661. border-color: $bg_color;
  1662. background-image: none;
  1663. }
  1664. &:backdrop {
  1665. color: mix($backdrop_fg_color, $backdrop_bg_color, 50%);
  1666. border-color: $backdrop_bg_color;
  1667. border-style: none solid solid none;
  1668. background-image: none;
  1669. background-color: $backdrop_base_color;
  1670. &:disabled {
  1671. border-color: $backdrop_bg_color;
  1672. background-image: none;
  1673. }
  1674. }
  1675. &:last-child { &:backdrop, & { border-right-style: none; }}
  1676. }
  1677. /*********
  1678. * Menus *
  1679. *********/
  1680. menubar,
  1681. .menubar {
  1682. -GtkWidget-window-dragging: true;
  1683. padding: 0px;
  1684. box-shadow: inset 0 -1px transparentize(black, 0.9);
  1685. &:backdrop { background-color: $backdrop_bg_color; }
  1686. > menuitem {
  1687. min-height: 16px;
  1688. padding: 4px 8px;
  1689. // remove padding and rounding from menubar submenus
  1690. menu {
  1691. &:dir(rtl), &:dir(ltr) { // specificity bump
  1692. border-radius: 0;
  1693. padding: 0;
  1694. }
  1695. }
  1696. &:hover { //Seems like it :hover even with keyboard focus
  1697. box-shadow: inset 0 -3px $selected_bg_color;
  1698. color: $link_color;
  1699. }
  1700. &:disabled {
  1701. color: $insensitive_fg_color;
  1702. box-shadow: none;
  1703. }
  1704. }
  1705. // remove padding and rounding from menubar submenu decoration
  1706. .csd.popup decoration {border-radius:0;}
  1707. }
  1708. // Needed to make the border-radius of menus work
  1709. // otherwise the background bleeds out of the menu edges
  1710. .background.popup { background-color: transparent; }
  1711. menu,
  1712. .menu,
  1713. .context-menu {
  1714. margin: 4px; // see https://bugzilla.gnome.org/show_bug.cgi?id=591258
  1715. padding: 4px 0px;
  1716. background-color: $menu_color;
  1717. border: 1px solid $borders_color; // adds borders in a non composited env
  1718. .csd & {
  1719. border: none; // axes borders in a composited env
  1720. border-radius: $menu_radius;
  1721. }
  1722. &:backdrop { background-color: $backdrop_menu_color; }
  1723. menuitem {
  1724. min-height: 16px;
  1725. min-width: 40px;
  1726. padding: 4px 6px;
  1727. text-shadow: none;
  1728. &:hover {
  1729. color: $selected_fg_color;
  1730. background-color: $selected_bg_color;
  1731. }
  1732. &:disabled {
  1733. color: $insensitive_fg_color;
  1734. &:backdrop { color: $backdrop_insensitive_color; }
  1735. }
  1736. &:backdrop,
  1737. &:backdrop:hover {
  1738. color: $backdrop_fg_color;
  1739. background-color: transparent;
  1740. }
  1741. // submenu indicators
  1742. arrow {
  1743. min-height: 16px;
  1744. min-width: 16px;
  1745. &:dir(ltr) {
  1746. -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
  1747. margin-left: 10px;
  1748. }
  1749. &:dir(rtl) {
  1750. -gtk-icon-source:-gtk-icontheme('pan-end-symbolic-rtl');
  1751. margin-right: 10px;
  1752. }
  1753. }
  1754. // avoids labels color being overridden, see
  1755. // https://bugzilla.gnome.org/show_bug.cgi?id=767058
  1756. label { &:dir(rtl), &:dir(ltr) { color: inherit; }}
  1757. }
  1758. // overflow arrows
  1759. > arrow {
  1760. @include button(undecorated);
  1761. min-height: 16px;
  1762. min-width: 16px;
  1763. padding: 4px;
  1764. background-color: $menu_color;
  1765. border-radius: 0;
  1766. &.top {
  1767. margin-top: -4px;
  1768. border-bottom: 1px solid mix($fg_color, $base_color, 10%);
  1769. border-top-right-radius: $menu_radius;
  1770. border-top-left-radius: $menu_radius;
  1771. -gtk-icon-source: -gtk-icontheme('pan-up-symbolic');
  1772. }
  1773. &.bottom {
  1774. margin-top: 8px;
  1775. margin-bottom: -12px;
  1776. border-top: 1px solid mix($fg_color, $base_color, 10%);
  1777. border-bottom-right-radius: $menu_radius;
  1778. border-bottom-left-radius: $menu_radius;
  1779. -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
  1780. }
  1781. &:hover { background-color: mix($fg_color, $base_color, 10%); }
  1782. &:backdrop { background-color: $backdrop_menu_color; }
  1783. &:disabled {
  1784. color: transparent;
  1785. background-color: transparent;
  1786. border-color: transparent ;
  1787. }
  1788. }
  1789. }
  1790. menuitem {
  1791. accelerator { color: gtkalpha(currentColor,0.55); }
  1792. check,
  1793. radio {
  1794. min-height: 16px;
  1795. min-width: 16px;
  1796. &:dir(ltr) { margin-right: 7px; }
  1797. &:dir(rtl) { margin-left: 7px; }
  1798. }
  1799. }
  1800. /***************
  1801. * Popovers *
  1802. ***************/
  1803. popover.background {
  1804. padding: 2px;
  1805. background-color: $popover_bg_color;
  1806. .csd &, & {
  1807. border: 1px solid $borders_color;
  1808. border-radius: $popover_radius;
  1809. }
  1810. .csd & {
  1811. $_popover_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
  1812. background-clip: padding-box;
  1813. border-color: $_popover_border;
  1814. }
  1815. box-shadow: 0 1px 2px transparentize(black, 0.7);
  1816. &:backdrop {
  1817. background-color: $backdrop_bg_color;
  1818. box-shadow: none;
  1819. }
  1820. > list,
  1821. > .view,
  1822. > toolbar {
  1823. border-style: none;
  1824. background-color: transparent;
  1825. }
  1826. .csd &, & {
  1827. &.touch-selection,
  1828. &.magnifier {
  1829. @extend %osd;
  1830. border: 1px solid transparentize(white, 0.9);
  1831. button { @extend %osd_button };
  1832. }
  1833. &.osd { @extend %osd; }
  1834. }
  1835. separator { margin: 3px; }
  1836. list separator { margin: 0px; }
  1837. }
  1838. /*************
  1839. * Notebooks *
  1840. *************/
  1841. notebook {
  1842. > header {
  1843. padding: 1px;
  1844. border-color: $borders_color;
  1845. border-width: 1px;
  1846. background-color: $dark_fill;
  1847. &:backdrop {
  1848. border-color: $backdrop_borders_color;
  1849. background-color: $backdrop_dark_fill;
  1850. }
  1851. tabs { margin: -1px; }
  1852. &.top {
  1853. border-bottom-style: solid;
  1854. > tabs {
  1855. margin-bottom: -2px;
  1856. > tab {
  1857. &:hover { box-shadow: inset 0 -4px $borders_color; }
  1858. &:backdrop { box-shadow: none; }
  1859. &:checked { box-shadow: inset 0 -4px $selected_bg_color; }
  1860. }
  1861. }
  1862. }
  1863. &.bottom {
  1864. border-top-style: solid;
  1865. > tabs {
  1866. margin-top: -2px;
  1867. > tab {
  1868. &:hover { box-shadow: inset 0 4px $borders_color; }
  1869. &:backdrop { box-shadow: none; }
  1870. &:checked { box-shadow: inset 0 4px $selected_bg_color; }
  1871. }
  1872. }
  1873. }
  1874. &.left {
  1875. border-right-style: solid;
  1876. > tabs {
  1877. margin-right: -2px;
  1878. > tab {
  1879. &:hover { box-shadow: inset -4px 0 $borders_color; }
  1880. &:backdrop { box-shadow: none; }
  1881. &:checked { box-shadow: inset -4px 0 $selected_bg_color; }
  1882. }
  1883. }
  1884. }
  1885. &.right {
  1886. border-left-style: solid;
  1887. > tabs {
  1888. margin-left: -2px;
  1889. > tab {
  1890. &:hover { box-shadow: inset 4px 0 $borders_color; }
  1891. &:backdrop { box-shadow: none; }
  1892. &:checked { box-shadow: inset 4px 0 $selected_bg_color; }
  1893. }
  1894. }
  1895. }
  1896. &.top > tabs > arrow {
  1897. @extend %notebook_vert_arrows;
  1898. border-top-style: none;
  1899. }
  1900. &.bottom > tabs > arrow {
  1901. @extend %notebook_vert_arrows;
  1902. border-bottom-style: none;
  1903. }
  1904. @at-root %notebook_vert_arrows {
  1905. margin-left: -5px;
  1906. margin-right: -5px;
  1907. padding-left: 4px;
  1908. padding-right: 4px;
  1909. &.down { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
  1910. &.up { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
  1911. }
  1912. &.left > tabs > arrow {
  1913. @extend %notebook_horz_arrows;
  1914. border-left-style: none;
  1915. }
  1916. &.right > tabs > arrow {
  1917. @extend %notebook_horz_arrows;
  1918. border-right-style: none;
  1919. }
  1920. @at-root %notebook_horz_arrows {
  1921. margin-top: -5px;
  1922. margin-bottom: -5px;
  1923. padding-top: 4px;
  1924. padding-bottom: 4px;
  1925. &.down { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
  1926. &.up { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
  1927. }
  1928. > tabs > arrow {
  1929. @extend %button_basic;
  1930. @extend %button_basic_flat;
  1931. min-height: 16px;
  1932. min-width: 16px;
  1933. border-radius: 0;
  1934. &:hover:not(:active):not(:backdrop) {
  1935. background-clip: padding-box;
  1936. background-image: none;
  1937. background-color: transparentize(white, 0.7);
  1938. border-color: transparent;
  1939. box-shadow: none;
  1940. }
  1941. &:disabled { @include button(undecorated); }
  1942. }
  1943. tab {
  1944. min-height: 30px;
  1945. min-width: 30px;
  1946. padding: 3px 12px;
  1947. outline-offset: -5px;
  1948. color: $fg_color;
  1949. font-weight: normal;
  1950. border-width: 1px; // for reorderable tabs
  1951. border-color: transparent; //
  1952. &:hover {
  1953. color: $fg_color;
  1954. background-color: darken($bg_color,4%);
  1955. &.reorderable-page {
  1956. border-color: transparentize($borders_color, 0.7);
  1957. background-color: transparentize($bg_color, 0.8);
  1958. }
  1959. }
  1960. &:backdrop {
  1961. color: mix($backdrop_fg_color, $backdrop_bg_color, 60%);
  1962. &.reorderable-page {
  1963. border-color: transparent;
  1964. background-color: transparent;
  1965. }
  1966. }
  1967. &:checked {
  1968. color: $fg_color;
  1969. &.reorderable-page {
  1970. border-color: transparentize($borders_color, 0.5);
  1971. background-color: transparentize($bg_color, 0.5);
  1972. &:hover { background-color: transparentize($bg_color, 0.3); }
  1973. }
  1974. }
  1975. &:backdrop:checked {
  1976. color: $backdrop_fg_color;
  1977. &.reorderable-page {
  1978. border-color: $backdrop_borders_color;
  1979. background-color: $backdrop_bg_color;
  1980. }
  1981. }
  1982. // colors the button like the label, overridden otherwise
  1983. button.flat {
  1984. &:hover { color: currentColor; }
  1985. &, &:backdrop { color: gtkalpha(currentColor, 0.3); }
  1986. padding: 0;
  1987. margin-top: 4px;
  1988. margin-bottom: 4px;
  1989. // FIXME: generalize .small-button?
  1990. min-width: 20px;
  1991. min-height: 20px;
  1992. &:last-child {
  1993. margin-left: 4px;
  1994. margin-right: -4px;
  1995. }
  1996. &:first-child {
  1997. margin-left: -4px;
  1998. margin-right: 4px;
  1999. }
  2000. }
  2001. }
  2002. &.top,
  2003. &.bottom {
  2004. tabs {
  2005. padding-left: 4px;
  2006. padding-right: 4px;
  2007. &:not(:only-child) {
  2008. margin-left: 3px;
  2009. margin-right: 3px;
  2010. &:first-child { margin-left: -1px; }
  2011. &:last-child { margin-right: -1px; }
  2012. }
  2013. tab {
  2014. margin-left: 4px;
  2015. margin-right: 4px;
  2016. &.reorderable-page { border-style: none solid; }
  2017. }
  2018. }
  2019. }
  2020. &.left,
  2021. &.right {
  2022. tabs {
  2023. padding-top: 4px;
  2024. padding-bottom: 4px;
  2025. &:not(:only-child) {
  2026. margin-top: 3px;
  2027. margin-bottom: 3px;
  2028. &:first-child { margin-top: -1px; }
  2029. &:last-child { margin-bottom: -1px; }
  2030. }
  2031. tab {
  2032. margin-top: 4px;
  2033. margin-bottom: 4px;
  2034. &.reorderable-page { border-style: solid none; }
  2035. }
  2036. }
  2037. }
  2038. &.top tab { padding-bottom: 4px; }
  2039. &.bottom tab { padding-top: 4px; }
  2040. }
  2041. > stack:not(:only-child) { // the :not(:only-child) is for "hidden" notebooks
  2042. background-color: $base_color;
  2043. &:backdrop { background-color: $backdrop_base_color; }
  2044. }
  2045. }
  2046. /**************
  2047. * Scrollbars *
  2048. **************/
  2049. scrollbar {
  2050. $_slider_min_length: 40px;
  2051. $_slider_width: 8px;
  2052. $_scrollbar_transition: all 300ms $ease-out-quad;
  2053. $_fine-tune_slider_border: $_slider_width - 3; //3672
  2054. // disable steppers
  2055. @at-root * {
  2056. -GtkScrollbar-has-backward-stepper: false;
  2057. -GtkScrollbar-has-forward-stepper: false;
  2058. }
  2059. background-color: $scrollbar_bg_color;
  2060. transition: $_scrollbar_transition;
  2061. // scrollbar border
  2062. &.top { border-bottom: 1px solid $borders_color; }
  2063. &.bottom { border-top: 1px solid $borders_color; }
  2064. &.left { border-right: 1px solid $borders_color; }
  2065. &.right { border-left: 1px solid $borders_color; }
  2066. &:backdrop {
  2067. background-color: $backdrop_scrollbar_bg_color;
  2068. border-color: $backdrop_borders_color;
  2069. transition: $backdrop_transition;
  2070. }
  2071. // slider
  2072. slider {
  2073. min-width: $_slider_width;
  2074. min-height: $_slider_width;
  2075. margin: -1px;
  2076. border: 4px solid transparent;
  2077. border-radius: 10px;
  2078. background-clip: padding-box;
  2079. background-color: $scrollbar_slider_color;
  2080. transition: $_scrollbar_transition;
  2081. &:hover { background-color: $scrollbar_slider_hover_color; }
  2082. &:hover:active { background-color: $scrollbar_slider_active_color; }
  2083. &:backdrop { background-color: $backdrop_scrollbar_slider_color; }
  2084. &:disabled { background-color: transparent; }
  2085. }
  2086. &.fine-tune {
  2087. slider {
  2088. transition: none;
  2089. min-width: $_fine-tune_slider_border+1;
  2090. min-height: $_fine-tune_slider_border+1;
  2091. }
  2092. &.horizontal slider { border-width: $_fine-tune_slider_border 4px; }
  2093. &.vertical slider { border-width: 4px $_fine-tune_slider_border; }
  2094. }
  2095. &.overlay-indicator {
  2096. &:not(.dragging):not(.hovering) {
  2097. border-color: transparent;
  2098. opacity: 0.4;
  2099. background-color: transparent;
  2100. slider {
  2101. margin: 0;
  2102. min-width: 3px;
  2103. min-height: 3px;
  2104. background-color: $fg_color;
  2105. border: 1px solid if($variant == 'light', white, black);
  2106. }
  2107. button {
  2108. min-width: 5px;
  2109. min-height: 5px;
  2110. background-color: $fg_color;
  2111. background-clip: padding-box;
  2112. border-radius: 100%;
  2113. border: 1px solid if($variant == 'light', white, black);
  2114. -gtk-icon-source: none;
  2115. }
  2116. &.horizontal {
  2117. slider {
  2118. margin: 0 2px;
  2119. min-width: $_slider_min_length;
  2120. }
  2121. button {
  2122. margin: 1px 2px;
  2123. min-width: 5px;
  2124. }
  2125. }
  2126. &.vertical {
  2127. slider {
  2128. margin: 2px 0;
  2129. min-height: $_slider_min_length;
  2130. }
  2131. button {
  2132. margin: 2px 1px;
  2133. min-height: 5px;
  2134. }
  2135. }
  2136. }
  2137. &.dragging,
  2138. &.hovering { opacity: 0.8; }
  2139. }
  2140. &.horizontal slider { min-width: $_slider_min_length; }
  2141. &.vertical slider { min-height: $_slider_min_length; }
  2142. // button styling
  2143. button {
  2144. padding: 0;
  2145. min-width: 12px;
  2146. min-height: 12px;
  2147. border-style: none;
  2148. border-radius: 0;
  2149. transition-property: min-height, min-width, color;
  2150. @include button(undecorated);
  2151. color: $scrollbar_slider_color;
  2152. &:hover {
  2153. @include button(undecorated);
  2154. color: $scrollbar_slider_hover_color;
  2155. }
  2156. &:active, &:checked {
  2157. @include button(undecorated);
  2158. color: $scrollbar_slider_active_color;
  2159. }
  2160. &:disabled {
  2161. @include button(undecorated);
  2162. color: transparentize($scrollbar_slider_color, 0.8);
  2163. }
  2164. &:backdrop {
  2165. @include button(undecorated);
  2166. color: $backdrop_scrollbar_slider_color;
  2167. &:disabled {
  2168. @include button(undecorated);
  2169. color: transparentize($backdrop_scrollbar_slider_color, 0.8);
  2170. }
  2171. }
  2172. }
  2173. // button icons
  2174. &.vertical {
  2175. button {
  2176. &.down { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
  2177. &.up { -gtk-icon-source: -gtk-icontheme('pan-up-symbolic'); }
  2178. }
  2179. }
  2180. &.horizontal {
  2181. button {
  2182. &.down { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic'); }
  2183. &.up { -gtk-icon-source: -gtk-icontheme('pan-start-symbolic'); }
  2184. }
  2185. }
  2186. }
  2187. treeview ~ scrollbar.vertical {
  2188. border-top: 1px solid $borders_color;
  2189. margin-top: -1px;
  2190. }
  2191. /**********
  2192. * Switch *
  2193. **********/
  2194. switch {
  2195. outline-offset: -4px;
  2196. // similar to the .scale
  2197. border: 1px solid $borders_color;
  2198. border-radius: 14px;
  2199. color: $fg_color;
  2200. background-color: $dark_fill;
  2201. text-shadow: 0 1px transparentize(black, 0.9);
  2202. &:checked {
  2203. color: $selected_fg_color;
  2204. border-color: $checkradio_borders_color;
  2205. background-color: $checkradio_bg_color;
  2206. text-shadow: 0 1px transparentize($selected_borders_color, 0.5),
  2207. 0 0 2px transparentize(white, 0.4);
  2208. }
  2209. &:disabled {
  2210. color: $insensitive_fg_color;
  2211. border-color: $borders_color;
  2212. background-color: $insensitive_bg_color;
  2213. text-shadow: none;
  2214. }
  2215. &:backdrop {
  2216. color: $backdrop_fg_color;
  2217. border-color: $backdrop_borders_color;
  2218. background-color: $backdrop_dark_fill;
  2219. text-shadow: none;
  2220. transition: $backdrop_transition;
  2221. &:checked {
  2222. @if $variant == 'light' { color: $backdrop_bg_color; }
  2223. border-color: if($variant == 'light', $checkradio_borders_color,
  2224. $selected_borders_color);
  2225. background-color: $checkradio_bg_color;
  2226. }
  2227. &:disabled {
  2228. color: $backdrop_insensitive_color;
  2229. border-color: $backdrop_borders_color;
  2230. background-color: $insensitive_bg_color;
  2231. }
  2232. }
  2233. slider {
  2234. margin: -1px;
  2235. min-width: 24px;
  2236. min-height: 24px;
  2237. border: 1px solid;
  2238. border-radius: 50%;
  2239. transition: $button_transition;
  2240. -gtk-outline-radius: 20px;
  2241. @if $variant == 'light' {
  2242. @include button(normal-alt, $edge: $shadow_color);
  2243. }
  2244. @else {
  2245. @include button(normal-alt, $c: lighten($bg_color,6%), $edge: $shadow_color);
  2246. }
  2247. }
  2248. image { color: transparent; } /* only show i / o for the accessible theme */
  2249. &:hover slider {
  2250. @if $variant == 'light' {
  2251. @include button(hover-alt, $edge: $shadow_color);
  2252. }
  2253. @else {
  2254. @include button(hover-alt, $c: lighten($bg_color,6%), $edge: $shadow_color);
  2255. }
  2256. }
  2257. &:checked > slider { border: 1px solid $checkradio_borders_color; }
  2258. &:disabled slider { @include button(insensitive); }
  2259. &:backdrop {
  2260. slider {
  2261. transition: $backdrop_transition;
  2262. @include button(backdrop);
  2263. }
  2264. &:checked > slider { border-color: $checkradio_borders_color; }
  2265. &:disabled slider { @include button(backdrop-insensitive); }
  2266. }
  2267. row:selected & {
  2268. @if $variant == 'light' {
  2269. box-shadow: none;
  2270. border-color: $checkradio_borders_color;
  2271. &:backdrop { border-color: $checkradio_borders_color; }
  2272. > slider { &:checked, & { border-color: $checkradio_borders_color; } }
  2273. }
  2274. }
  2275. }
  2276. /*************************
  2277. * Check and Radio items *
  2278. *************************/
  2279. // draw regular check and radio items using our PNG assets
  2280. // all assets are rendered from assets.svg. never add pngs directly
  2281. //selection-mode
  2282. @each $check_state, $check_icon, $check_color, $check_background in
  2283. ('', 'none', 'transparent', $checkradio_bg_color),
  2284. (':hover', 'none', 'transparent', $checkradio_bg_color),
  2285. (':active', 'none', 'transparent', $checkradio_bg_color),
  2286. (':backdrop', 'none', 'transparent', '#{desaturate($checkradio_bg_color, 100%)}'),
  2287. (':checked', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
  2288. (':checked:hover', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
  2289. (':checked:active', '-gtk-icontheme(\'object-select-symbolic\')', $osd_fg_color, $checkradio_bg_color),
  2290. (':backdrop:checked', '-gtk-icontheme(\'object-select-symbolic\')', '#{transparentize($osd_fg_color, 0.2)}', '#{desaturate($checkradio_bg_color, 100%)}'), {
  2291. .view.content-view.check#{$check_state}:not(list),
  2292. .content-view:not(list) check#{$check_state} {
  2293. margin: 4px;
  2294. min-width: 32px;
  2295. min-height: 32px;
  2296. color: #{$check_color};
  2297. background-color: #{$check_background};
  2298. border-radius: 5px;
  2299. background-image: none;
  2300. transition: 200ms;
  2301. box-shadow: none;
  2302. border-width: 0;
  2303. -gtk-icon-source: #{$check_icon};
  2304. -gtk-icon-shadow: none;
  2305. }
  2306. }
  2307. checkbutton.text-button, radiobutton.text-button {
  2308. // this is for a nice focus on check and radios text
  2309. padding: 2px 0;
  2310. outline-offset: 0;
  2311. label:not(:only-child) {
  2312. &:first-child { margin-left: 4px; }
  2313. &:last-child { margin-right: 4px; }
  2314. }
  2315. }
  2316. check,
  2317. radio {
  2318. margin: 0 4px;
  2319. &:only-child { margin: 0; }
  2320. popover & { // when in a popover add more space between the label and the check, reset the other side margin.
  2321. // See https://bugzilla.gnome.org/show_bug.cgi?id=779570 for details.
  2322. &.left:dir(rtl) {
  2323. margin-left: 0;
  2324. margin-right: 12px;
  2325. }
  2326. &.right:dir(ltr) {
  2327. margin-left: 12px;
  2328. margin-right: 0;
  2329. }
  2330. }
  2331. min-height: 14px;
  2332. min-width: 14px;
  2333. border: 1px solid;
  2334. -gtk-icon-source: none;
  2335. & {
  2336. // for unchecked
  2337. $_c: if($variant=='light', white, $bg_color);
  2338. @each $state, $t in ("", "normal"),
  2339. (":hover", "hover"),
  2340. (":active", "active"),
  2341. (":disabled", "insensitive"),
  2342. (":backdrop", "backdrop"),
  2343. (":backdrop:disabled", 'backdrop-insensitive') {
  2344. &#{$state} {
  2345. @include check($t, $_c);
  2346. }
  2347. }
  2348. }
  2349. & {
  2350. // for checked
  2351. @each $t in (':checked'), (':indeterminate') {
  2352. &#{$t} {
  2353. @each $state, $t in ("", "normal"),
  2354. (":hover", "hover"),
  2355. (":active", "active"),
  2356. (":disabled", "insensitive"),
  2357. (":backdrop", "backdrop"),
  2358. (":backdrop:disabled", 'backdrop-insensitive') {
  2359. &#{$state} {
  2360. @include check($t, $checkradio_bg_color, $checkradio_fg_color, $checked: true);
  2361. }
  2362. }
  2363. }
  2364. }
  2365. }
  2366. &:backdrop { transition: $backdrop_transition; }
  2367. @if $variant == 'light' {
  2368. // the borders of the light variant versions of checks and radios are too similar in luminosity to the selected background
  2369. // color, hence we need special casing.
  2370. row:selected & { border-color: $checkradio_borders_color; }
  2371. }
  2372. .osd & {
  2373. @include button(osd);
  2374. &:hover { @include button(osd); }
  2375. &:active { @include button(osd-active); }
  2376. &:backdrop { @include button(osd-backdrop); }
  2377. &:disabled { @include button(osd-insensitive); }
  2378. }
  2379. menu menuitem & {
  2380. margin: 0; // this is a workaround for a menu check/radio size allocation issue
  2381. &, &:checked, &:indeterminate {
  2382. &, &:hover, &:disabled { //FIXME use button reset mixin
  2383. min-height: 14px;
  2384. min-width: 14px;
  2385. background-image: none;
  2386. background-color: transparent;
  2387. box-shadow: none;
  2388. -gtk-icon-shadow: none;
  2389. color: inherit;
  2390. border-color: currentColor;
  2391. }
  2392. }
  2393. }
  2394. }
  2395. %check,
  2396. check {
  2397. border-radius: 3px;
  2398. &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/check-symbolic.svg")),
  2399. -gtk-recolor(url("assets/check-symbolic.symbolic.png"))); }
  2400. &:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")),
  2401. -gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
  2402. }
  2403. %radio,
  2404. radio {
  2405. border-radius: 100%;
  2406. &:checked { -gtk-icon-source: image(-gtk-recolor(url("assets/bullet-symbolic.svg")),
  2407. -gtk-recolor(url("assets/bullet-symbolic.symbolic.png"))); }
  2408. &:indeterminate { -gtk-icon-source: image(-gtk-recolor(url("assets/dash-symbolic.svg")),
  2409. -gtk-recolor(url("assets/dash-symbolic.symbolic.png"))); }
  2410. }
  2411. // ANIMATION:
  2412. // this is made with those pretty convoluted transitions, since checks and radios have to animate only on state changes,
  2413. // the transformation is set on the active state and it get reset on the checked state.
  2414. radio:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: scale(0); }
  2415. check:not(:indeterminate):not(:checked):active:not(:backdrop) { -gtk-icon-transform: translate(6px, -3px) rotate(-45deg) scaleY(0.2) rotate(45deg) scaleX(0); }
  2416. radio,
  2417. check {
  2418. &:active { -gtk-icon-transform: scale(0, 1); } // should tackle the indeterminate state, untested
  2419. &:checked:not(:backdrop), &:indeterminate:not(:backdrop) {
  2420. -gtk-icon-transform: unset;
  2421. transition: 400ms;
  2422. }
  2423. }
  2424. menu menuitem {
  2425. radio,
  2426. check {
  2427. &:checked:not(:backdrop), &:indeterminate:not(:backdrop) { transition: none; }
  2428. }
  2429. }
  2430. treeview.view check,
  2431. treeview.view radio {
  2432. &:selected {
  2433. &:focus, & {
  2434. color: $checkradio_fg_color;
  2435. @if $variant == 'light' { border-color: $selected_borders_color; }
  2436. }
  2437. }
  2438. }
  2439. treeview.view radio:selected { &:focus, & { @extend %radio; }} // This is a workaround
  2440. /************
  2441. * GtkScale *
  2442. ************/
  2443. %scale_trough {
  2444. border: 1px solid $borders_color;
  2445. border-radius: 3px;
  2446. background-color: $dark_fill;
  2447. &:disabled { background-color: $insensitive_bg_color; }
  2448. &:backdrop {
  2449. background-color: $backdrop_dark_fill;
  2450. border-color: $backdrop_borders_color;
  2451. transition: $backdrop_transition;
  2452. &:disabled { background-color: $insensitive_bg_color; }
  2453. }
  2454. // ...on selected list rows
  2455. row:selected & { &:disabled, & { border-color: $selected_borders_color; }}
  2456. // OSD
  2457. .osd & {
  2458. border-color: $osd_borders_color;
  2459. background-color: transparentize($osd_borders_color, 0.2);
  2460. &:disabled { background-color: $osd_insensitive_bg_color; }
  2461. }
  2462. }
  2463. %scale_highlight {
  2464. border: 1px solid $progress_border_color;
  2465. border-radius: 3px;
  2466. background-color: $progress_bg_color;
  2467. &:disabled {
  2468. background-color: transparent;
  2469. border-color: transparent;
  2470. }
  2471. &:backdrop {
  2472. border-color: if($variant=='light', $progress_bg_color,
  2473. $progress_border_color);
  2474. &:disabled {
  2475. background-color: transparent;
  2476. border-color: transparent;
  2477. }
  2478. }
  2479. // ...on selected list rows
  2480. row:selected & { &:disabled, & { border-color: $selected_borders_color; }}
  2481. // OSD
  2482. .osd & {
  2483. border-color: $osd_borders_color;
  2484. &:disabled { border-color: transparent; }
  2485. }
  2486. }
  2487. scale {
  2488. // sizing
  2489. $_marks_length: 6px;
  2490. $_marks_distance: 6px;
  2491. min-height: 10px;
  2492. min-width: 10px;
  2493. padding: 12px;
  2494. // those are inside the trough node, I need them to show their own border over the trough one, so negative margin
  2495. fill,
  2496. highlight { margin: -1px; }
  2497. // the slider is inside the trough, so to have make it bigger there's a negative margin
  2498. slider {
  2499. min-height: 18px;
  2500. min-width: 18px;
  2501. margin: -9px;
  2502. }
  2503. // click-and-hold the slider to activate
  2504. &.fine-tune {
  2505. &.horizontal {
  2506. padding-top: 9px;
  2507. padding-bottom: 9px;
  2508. min-height: 16px;
  2509. }
  2510. &.vertical {
  2511. padding-left: 9px;
  2512. padding-right: 9px;
  2513. min-width: 16px;
  2514. }
  2515. // to make the trough grow in fine-tune mode
  2516. slider { margin: -6px; }
  2517. fill,
  2518. highlight,
  2519. trough {
  2520. border-radius: 5px;
  2521. -gtk-outline-radius: 7px;
  2522. }
  2523. }
  2524. // the backing bit
  2525. trough {
  2526. @extend %scale_trough;
  2527. outline-offset: 2px;
  2528. -gtk-outline-radius: 5px;
  2529. }
  2530. // the colored part of the backing bit
  2531. highlight { @extend %scale_highlight; }
  2532. // this is another differently styled part of the backing bit, the most relevant use case is for example
  2533. // in media player to indicate how much video stream as been cached
  2534. fill {
  2535. @extend %scale_trough;
  2536. &:backdrop, & { background-color: $borders_color; }
  2537. &:disabled {
  2538. &:backdrop, & {
  2539. border-color: transparent;
  2540. background-color: transparent;
  2541. }
  2542. }
  2543. // OSD
  2544. .osd & {
  2545. background-color: mix($osd_fg_color, $osd_borders_color, 25%);
  2546. &:disabled {
  2547. &:backdrop, & {
  2548. border-color: transparent;
  2549. background-color: transparent;
  2550. }
  2551. }
  2552. }
  2553. }
  2554. slider {
  2555. @include button(normal-alt, $edge: $shadow_color);
  2556. border: 1px solid darken($alt_borders_color, 3%);
  2557. border-radius: 100%;
  2558. transition: $button_transition;
  2559. transition-property: background, border, box-shadow;
  2560. &:hover { @include button(hover-alt, $edge: $shadow_color); }
  2561. &:active { border-color: $progress_border_color; }
  2562. &:disabled { @include button(insensitive); }
  2563. &:backdrop {
  2564. transition: $backdrop_transition;
  2565. @include button(backdrop);
  2566. &:disabled { @include button(backdrop-insensitive); }
  2567. }
  2568. // ...on selected list rows
  2569. row:selected & { &:disabled, & { border-color: $selected_borders_color; } }
  2570. // OSD
  2571. .osd & {
  2572. @include button(osd);
  2573. border-color: darken($osd_borders_color, 3%);
  2574. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2575. &:hover {
  2576. @include button(osd-hover);
  2577. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2578. }
  2579. &:active {
  2580. @include button(osd-active);
  2581. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2582. }
  2583. &:disabled {
  2584. @include button(osd-insensitive);
  2585. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2586. }
  2587. &:backdrop {
  2588. @include button(osd-backdrop);
  2589. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2590. &:disabled {
  2591. @include button(osd-backdrop-insensitive);
  2592. background-color: opacify($osd_bg_color, 1); // solid background needed here
  2593. }
  2594. }
  2595. }
  2596. }
  2597. marks,
  2598. value {
  2599. color: gtkalpha(currentColor, 0.55);
  2600. font-feature-settings: "tnum";
  2601. }
  2602. //marks margins
  2603. @each $scale_orient, $marks_class, $marks_pos, $marks_margin in (horizontal, top, top, bottom),
  2604. (horizontal, bottom, bottom, top),
  2605. (vertical, top, left, right),
  2606. (vertical, bottom, right, left) {
  2607. &.#{$scale_orient} marks {
  2608. &.#{$marks_class} {
  2609. margin-#{$marks_margin}: $_marks_distance;
  2610. margin-#{$marks_pos}: -($_marks_distance + $_marks_length);
  2611. }
  2612. }
  2613. &.#{$scale_orient}.fine-tune marks {
  2614. &.#{$marks_class} {
  2615. margin-#{$marks_margin}: $_marks_distance;
  2616. margin-#{$marks_pos}: -($_marks_distance + $_marks_length - 3px);
  2617. }
  2618. }
  2619. }
  2620. &.horizontal {
  2621. indicator {
  2622. min-height: $_marks_length;
  2623. min-width: 1px;
  2624. }
  2625. &.fine-tune indicator { min-height: ($_marks_length - 3px); }
  2626. }
  2627. &.vertical {
  2628. indicator {
  2629. min-height: 1px;
  2630. min-width: $_marks_length;
  2631. }
  2632. &.fine-tune indicator { min-width: ($_marks_length - 3px); }
  2633. }
  2634. // *WARNING* scale with marks madness following
  2635. // FIXME: OSD and selected list rows missing, I don't feel like adding the other 144 assets needed for those...
  2636. $suffix: if($variant == 'light', '', '-dark');
  2637. @each $dir_class, $dir_infix in ('horizontal', 'horz'),
  2638. ('vertical', 'vert') {
  2639. @each $marks_infix, $marks_class in ('scale-has-marks-above', 'marks-before:not(.marks-after)'),
  2640. ('scale-has-marks-below', 'marks-after:not(.marks-before)') {
  2641. @each $state, $state_infix in ('', ''),
  2642. (':hover', '-hover'),
  2643. (':active', '-active'),
  2644. (':disabled', '-insensitive'),
  2645. (':backdrop', '-backdrop'),
  2646. (':backdrop:disabled', '-backdrop-insensitive') {
  2647. &.#{$dir_class}.#{$marks_class} {
  2648. slider {
  2649. &#{$state} {
  2650. // an asymmetric slider asset is used here, so the margins are uneven, the smaller
  2651. // margin is set on the point side.
  2652. margin: -10px;
  2653. $_scale_asset: 'assets/slider-#{$dir_infix}-#{$marks_infix}#{$state_infix}#{$suffix}';
  2654. border-style: none;
  2655. border-radius: 0;
  2656. background-color: transparent;
  2657. background-image: -gtk-scaled(url('#{$_scale_asset}.png'), url('#{$_scale_asset}@2.png'));
  2658. $_scale_slider_bg_pos: bottom;
  2659. @if $dir_class == 'horizontal' {
  2660. min-height: 26px;
  2661. min-width: 22px;
  2662. @if $marks_infix == 'scale-has-marks-above' {
  2663. margin-top: -14px;
  2664. $_scale_slider_bg_pos: top;
  2665. }
  2666. @else { margin-bottom: -14px; }
  2667. }
  2668. @else {
  2669. min-height: 22px;
  2670. min-width: 26px;
  2671. @if $marks_infix == 'scale-has-marks-above' {
  2672. margin-left: -14px;
  2673. $_scale_slider_bg_pos: left bottom;
  2674. }
  2675. @else {
  2676. margin-right: -14px;
  2677. $_scale_slider_bg_pos: right bottom;
  2678. }
  2679. }
  2680. background-position: $_scale_slider_bg_pos;
  2681. background-repeat: no-repeat;
  2682. box-shadow: none;
  2683. }
  2684. }
  2685. &.fine-tune slider {
  2686. // bigger negative margins to make the trough grow here as well
  2687. margin: -7px;
  2688. @if $dir_class == 'horizontal' {
  2689. @if $marks_infix == 'scale-has-marks-above' { margin-top: -11px; }
  2690. @else { margin-bottom: -11px; }
  2691. }
  2692. @else {
  2693. @if $marks_infix == 'scale-has-marks-above' { margin-left: -11px; }
  2694. @else { margin-right: -11px; }
  2695. }
  2696. }
  2697. }
  2698. }
  2699. }
  2700. }
  2701. &.color {
  2702. min-height: 0;
  2703. min-width: 0;
  2704. trough {
  2705. background-image: image($borders_color);
  2706. background-repeat: no-repeat;
  2707. }
  2708. &.horizontal {
  2709. padding: 0 0 15px 0;
  2710. trough {
  2711. padding-bottom: 4px;
  2712. background-position: 0 -3px;
  2713. border-top-left-radius: 0;
  2714. border-top-right-radius: 0;
  2715. }
  2716. slider {
  2717. &:dir(ltr), &:dir(rtl) { // specificity bumb
  2718. &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
  2719. margin-bottom: -15px;
  2720. margin-top: 6px;
  2721. }
  2722. }
  2723. }
  2724. }
  2725. &.vertical {
  2726. &:dir(ltr) {
  2727. padding: 0 0 0 15px;
  2728. trough {
  2729. padding-left: 4px;
  2730. background-position: 3px 0;
  2731. border-bottom-right-radius: 0;
  2732. border-top-right-radius: 0;
  2733. }
  2734. slider {
  2735. &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
  2736. margin-left: -15px;
  2737. margin-right: 6px;
  2738. }
  2739. }
  2740. }
  2741. &:dir(rtl) {
  2742. padding: 0 15px 0 0;
  2743. trough {
  2744. padding-right: 4px;
  2745. background-position: -3px 0;
  2746. border-bottom-left-radius: 0;
  2747. border-top-left-radius: 0;
  2748. }
  2749. slider {
  2750. &:hover, &:backdrop, &:disabled, &:backdrop:disabled, & {
  2751. margin-right: -15px;
  2752. margin-left: 6px;
  2753. }
  2754. }
  2755. }
  2756. }
  2757. &.fine-tune {
  2758. &.horizontal {
  2759. &:dir(ltr), &:dir(rtl) { // specificity bump
  2760. padding: 0 0 12px 0;
  2761. trough {
  2762. padding-bottom: 7px;
  2763. background-position: 0 -6px;
  2764. }
  2765. slider {
  2766. margin-bottom: -15px;
  2767. margin-top: 6px;
  2768. }
  2769. }
  2770. }
  2771. &.vertical {
  2772. &:dir(ltr) {
  2773. padding: 0 0 0 12px;
  2774. trough {
  2775. padding-left: 7px;
  2776. background-position: 6px 0;
  2777. }
  2778. slider {
  2779. margin-left: -15px;
  2780. margin-right: 6px;
  2781. }
  2782. }
  2783. &:dir(rtl) {
  2784. padding: 0 12px 0 0;
  2785. trough {
  2786. padding-right: 7px;
  2787. background-position: -6px 0;
  2788. }
  2789. slider {
  2790. margin-right: -15px;
  2791. margin-left: 6px;
  2792. }
  2793. }
  2794. }
  2795. }
  2796. }
  2797. }
  2798. /*****************
  2799. * Progress bars *
  2800. *****************/
  2801. progressbar {
  2802. // sizing
  2803. &.horizontal {
  2804. trough,
  2805. progress { min-height: 2px; }
  2806. }
  2807. &.vertical {
  2808. trough,
  2809. progress { min-width: 2px; }
  2810. }
  2811. &.horizontal progress { margin: 0 -1px; } // the progress node is positioned after the trough border
  2812. &.vertical progress { margin: -1px 0; } // this moves it over it.
  2813. // FIXME: insensitive state missing and some other state should be set probably
  2814. font-size: smaller;
  2815. color: transparentize($fg_color, 0.6);
  2816. font-feature-settings: "tnum";
  2817. &:backdrop {
  2818. box-shadow: none;
  2819. transition: $backdrop_transition;
  2820. }
  2821. trough { @extend %scale_trough; }
  2822. progress {
  2823. @extend %scale_highlight;
  2824. border-radius: 1.5px;
  2825. &.left {
  2826. border-top-left-radius: 2px;
  2827. border-bottom-left-radius: 2px;
  2828. }
  2829. &.right {
  2830. border-top-right-radius: 2px;
  2831. border-bottom-right-radius: 2px;
  2832. }
  2833. &.top {
  2834. border-top-right-radius: 2px;
  2835. border-top-left-radius: 2px;
  2836. }
  2837. &.bottom {
  2838. border-bottom-right-radius: 2px;
  2839. border-bottom-left-radius: 2px;
  2840. }
  2841. }
  2842. &.osd { // progressbar.osd used for epiphany page loading progress
  2843. min-width: 3px;
  2844. min-height: 3px;
  2845. background-color: transparent;
  2846. trough {
  2847. border-style: none;
  2848. border-radius: 0;
  2849. background-color: transparent;
  2850. box-shadow: none;
  2851. }
  2852. progress {
  2853. border-style: none;
  2854. border-radius: 0;
  2855. }
  2856. }
  2857. trough.empty progress { all: unset; } // makes the progress indicator disappear, when the fraction is 0
  2858. }
  2859. /*************
  2860. * Level Bar *
  2861. *************/
  2862. levelbar {
  2863. &.horizontal {
  2864. block {
  2865. min-height: 1px;
  2866. }
  2867. &.discrete block {
  2868. margin: 0 1px;
  2869. min-width: 32px;
  2870. }
  2871. }
  2872. &.vertical {
  2873. block {
  2874. min-width: 1px;
  2875. }
  2876. &.discrete block {
  2877. margin: 1px 0;
  2878. min-height: 32px;
  2879. }
  2880. }
  2881. &:backdrop { transition: $backdrop_transition; }
  2882. trough {
  2883. border: 1px solid;
  2884. padding: 2px;
  2885. border-radius: 3px;
  2886. @include entry(normal);
  2887. &:backdrop { @include entry(backdrop); }
  2888. }
  2889. block {
  2890. border: 1px solid;
  2891. border-radius: 1px;
  2892. &.low {
  2893. border-color: if($variant == 'light', darken($warning_color, 20%), $warning_color);
  2894. background-color: $warning_color;
  2895. &:backdrop { border-color: $warning_color; };
  2896. }
  2897. &.high,
  2898. &:not(.empty) {
  2899. border-color: if($variant == 'light', darken($progress_bg_color, 20%), $progress_bg_color);
  2900. background-color: $progress_bg_color;
  2901. &:backdrop { border-color: $progress_bg_color; }
  2902. }
  2903. &.full {
  2904. border-color: if($variant == 'light', darken($success_color, 20%), $success_color);
  2905. background-color: $success_color;
  2906. &:backdrop { border-color: $success_color; };
  2907. }
  2908. &.empty {
  2909. background-color: transparent;
  2910. border-color: if($variant == 'light', transparentize($fg_color,0.8), transparentize($fg_color,0.9));
  2911. &:backdrop { border-color: transparentize($backdrop_fg_color,0.85); }
  2912. }
  2913. }
  2914. }
  2915. /****************
  2916. * Print dialog *
  2917. *****************/
  2918. printdialog {
  2919. paper {
  2920. color: $fg_color;
  2921. border: 1px solid $borders_color;
  2922. background: white;
  2923. padding: 0;
  2924. &:backdrop {
  2925. color: $backdrop_fg_color;
  2926. border-color: $backdrop_borders_color;
  2927. }
  2928. }
  2929. .dialog-action-box { margin: 12px; }
  2930. }
  2931. /**********
  2932. * Frames *
  2933. **********/
  2934. frame > border,
  2935. .frame {
  2936. box-shadow: none;
  2937. margin: 0;
  2938. padding: 0;
  2939. border-radius: 0;
  2940. border: 1px solid $borders_color;
  2941. &.flat { border-style: none; }
  2942. &:backdrop { border-color: $backdrop_borders_color; }
  2943. }
  2944. actionbar > revealer > box {
  2945. padding: 6px;
  2946. border-top: 1px solid $borders_color;
  2947. &:backdrop { border-color: $backdrop_borders_color; }
  2948. }
  2949. scrolledwindow {
  2950. viewport.frame { // avoid double borders when viewport inside scrolled window
  2951. border-style: none;
  2952. }
  2953. // This is used when content is touch-dragged past boundaries.
  2954. // draws a box on top of the content, the size changes programmatically.
  2955. overshoot {
  2956. &.top {
  2957. @include overshoot(top);
  2958. &:backdrop { @include overshoot(top, backdrop); }
  2959. }
  2960. &.bottom {
  2961. @include overshoot(bottom);
  2962. &:backdrop { @include overshoot(bottom, backdrop); }
  2963. }
  2964. &.left {
  2965. @include overshoot(left);
  2966. &:backdrop { @include overshoot(left, backdrop); }
  2967. }
  2968. &.right {
  2969. @include overshoot(right);
  2970. &:backdrop { @include overshoot(right, backdrop); }
  2971. }
  2972. }
  2973. junction { // the small square between two scrollbars
  2974. border-color: transparent;
  2975. // the border image is used to add the missing dot between the borders, details, details, details...
  2976. border-image: linear-gradient(to bottom, $borders_color 1px, transparent 1px) 0 0 0 1 / 0 1px stretch;
  2977. background-color: $scrollbar_bg_color;
  2978. &:dir(rtl) { border-image-slice: 0 1 0 0; }
  2979. &:backdrop {
  2980. border-image-source: linear-gradient(to bottom, $backdrop_borders_color 1px, transparent 1px);
  2981. background-color: $backdrop_scrollbar_bg_color;
  2982. transition: $backdrop_transition;
  2983. }
  2984. }
  2985. }
  2986. //vbox and hbox separators
  2987. separator {
  2988. background: transparentize(black, 0.9);
  2989. min-width: 1px;
  2990. min-height: 1px;
  2991. }
  2992. /*********
  2993. * Lists *
  2994. *********/
  2995. list {
  2996. color: $text_color;
  2997. background-color: $base_color;
  2998. border-color: $borders_color;
  2999. &:backdrop {
  3000. color: $backdrop_text_color;
  3001. background-color: $backdrop_base_color;
  3002. border-color: $backdrop_borders_color;
  3003. }
  3004. row { padding: 2px; }
  3005. }
  3006. row {
  3007. transition: all 150ms $ease-out-quad;
  3008. &:hover { transition: none; }
  3009. &:backdrop { transition: $backdrop_transition; }
  3010. &.activatable {
  3011. &.has-open-popup, // this is for indicathing which row generated a popover see https://bugzilla.gnome.org/show_bug.cgi?id=754411
  3012. &:hover { background-color: if(variant == light, transparentize($fg_color, 0.9), transparentize($fg_color, 0.95)); }
  3013. &:active { box-shadow: inset 0 2px 2px -2px transparentize(black, 0.8); }
  3014. &:backdrop:hover { background-color: transparent; }
  3015. &:selected {
  3016. &:active { box-shadow: inset 0 2px 3px -1px transparentize(black, 0.5); }
  3017. &.has-open-popup,
  3018. &:hover { background-color: mix($fg_color, $selected_bg_color, 10%); }
  3019. &:backdrop { background-color: $selected_bg_color; }
  3020. }
  3021. }
  3022. &:selected { @extend %selected_items; }
  3023. }
  3024. /*********************
  3025. * App Notifications *
  3026. *********************/
  3027. .app-notification,
  3028. .app-notification.frame {
  3029. @extend %osd;
  3030. padding: 10px;
  3031. border-radius: 0 0 5px 5px;
  3032. background-color: $osd_bg_color;
  3033. background-image: linear-gradient(to bottom, transparentize(black, 0.8),
  3034. transparent 2px);
  3035. background-clip: padding-box;
  3036. &:backdrop {
  3037. background-image: none;
  3038. transition: $backdrop_transition;
  3039. }
  3040. button { @extend %osd_button; }
  3041. border { border: none; }
  3042. }
  3043. /*************
  3044. * Expanders *
  3045. *************/
  3046. expander {
  3047. title > arrow {
  3048. min-width: 16px;
  3049. min-height: 16px;
  3050. -gtk-icon-source: -gtk-icontheme('pan-end-symbolic');
  3051. &:dir(rtl) { -gtk-icon-source: -gtk-icontheme('pan-end-symbolic-rtl'); }
  3052. &:hover { color: lighten($fg_color,30%); } //only lightens the arrow
  3053. &:disabled { color: $insensitive_fg_color; }
  3054. &:disabled:backdrop { color: $backdrop_insensitive_color; }
  3055. &:checked { -gtk-icon-source: -gtk-icontheme('pan-down-symbolic'); }
  3056. }
  3057. }
  3058. /************
  3059. * Calendar *
  3060. ***********/
  3061. calendar {
  3062. color: $text_color;
  3063. border: 1px solid $borders_color;
  3064. &:selected {
  3065. @extend %selected_items;
  3066. border-radius: 3px;
  3067. }
  3068. &.header {
  3069. border-bottom-color: transparentize(black, 0.9);
  3070. &:backdrop { border-bottom-color: transparentize(black, 0.9); }
  3071. }
  3072. &.button {
  3073. @extend %undecorated_button;
  3074. color: transparentize($fg_color, 0.55);
  3075. &:hover { color: $fg_color; }
  3076. &:backdrop { color: transparentize($backdrop_fg_color,0.55); }
  3077. &:disabled { color: transparentize($insensitive_fg_color,0.55); }
  3078. }
  3079. &.highlight {
  3080. color: $insensitive_fg_color;
  3081. &:backdrop { color: $backdrop_insensitive_color; }
  3082. }
  3083. &:backdrop {
  3084. color: $backdrop_text_color;
  3085. border-color: $backdrop_borders_color;
  3086. }
  3087. &:indeterminate { color: gtkalpha(currentColor, 0.1); }
  3088. }
  3089. /***********
  3090. * Dialogs *
  3091. ***********/
  3092. messagedialog { // Message Dialog styling
  3093. .titlebar {
  3094. min-height: 20px;
  3095. background-image: none;
  3096. background-color: $bg_color;
  3097. border-style: none;
  3098. border-top-left-radius: 7px;
  3099. border-top-right-radius: 7px;
  3100. }
  3101. &.csd { // rounded bottom border styling for csd version
  3102. &.background {
  3103. // bigger radius for better antialiasing
  3104. border-bottom-left-radius: $window_radius+1;
  3105. border-bottom-right-radius: $window_radius+1;
  3106. }
  3107. .dialog-action-area button {
  3108. padding: 10px 14px; // labels are not vertically centered on message dialog, this is a workaround
  3109. border-right-style: none;
  3110. border-bottom-style: none;
  3111. border-radius: 0;
  3112. -gtk-outline-radius: 0;
  3113. &:first-child {
  3114. border-left-style: none;
  3115. border-bottom-left-radius: $button_radius + 2;
  3116. -gtk-outline-bottom-left-radius: $button_radius + 2;
  3117. }
  3118. &:last-child {
  3119. border-bottom-right-radius: $button_radius + 2;
  3120. -gtk-outline-bottom-right-radius: $button_radius + 2;
  3121. }
  3122. }
  3123. }
  3124. }
  3125. filechooser {
  3126. .dialog-action-box {
  3127. border-top: 1px solid $borders_color;
  3128. &:backdrop { border-top-color: $backdrop_borders_color; }
  3129. }
  3130. #pathbarbox { border-bottom: 1px solid $bg_color; }
  3131. }
  3132. filechooserbutton:drop(active) {
  3133. box-shadow: none;
  3134. border-color: transparent;
  3135. }
  3136. /***********
  3137. * Sidebar *
  3138. ***********/
  3139. .sidebar {
  3140. border-style: none;
  3141. background-color: mix($bg_color, $base_color, 50%);
  3142. &:not(separator) {
  3143. @at-root %sidebar_left,
  3144. &:dir(ltr),
  3145. &.left,
  3146. &.left:dir(rtl) {
  3147. border-right: 1px solid $borders_color;
  3148. border-left-style: none;
  3149. }
  3150. @at-root %sidebar_right,
  3151. &:dir(rtl),
  3152. &.right {
  3153. border-left: 1px solid $borders_color;
  3154. border-right-style: none;
  3155. }
  3156. }
  3157. &:backdrop {
  3158. background-color: $backdrop_sidebar_bg_color;
  3159. border-color: $backdrop_borders_color;
  3160. transition: $backdrop_transition;
  3161. }
  3162. list { background-color: transparent; }
  3163. paned & { &.left, &.right, &.left:dir(rtl), &:dir(rtl), &:dir(ltr), & { border-style: none; }}
  3164. }
  3165. stacksidebar {
  3166. &.sidebar {
  3167. &:dir(ltr),
  3168. &.left,
  3169. &.left:dir(rtl) { list { @extend %sidebar_left; }}
  3170. &:dir(rtl),
  3171. &.right { list { @extend %sidebar_right; }}
  3172. }
  3173. row {
  3174. padding: 10px 4px;
  3175. > label {
  3176. padding-left: 6px;
  3177. padding-right: 6px;
  3178. }
  3179. &.needs-attention > label {
  3180. @extend %needs_attention;
  3181. background-size: 6px 6px, 0 0;
  3182. }
  3183. }
  3184. }
  3185. separator.sidebar {
  3186. background-color: $borders_color;
  3187. &:backdrop {
  3188. background-color: $backdrop_borders_color;
  3189. }
  3190. &.selection-mode,
  3191. .selection-mode & {
  3192. background-color: darken($suggested_bg_color, 20%);
  3193. }
  3194. }
  3195. /****************
  3196. * File chooser *
  3197. ****************/
  3198. $_placesidebar_icons_opacity: 0.7;
  3199. row image.sidebar-icon { opacity: $_placesidebar_icons_opacity; } // dim the sidebar icons
  3200. // see bug #786613 for details
  3201. // on this oddity
  3202. placessidebar {
  3203. > viewport.frame { border-style: none; }
  3204. row {
  3205. // Needs overriding of the GtkListBoxRow padding
  3206. min-height: 36px;
  3207. padding: 0px;
  3208. // Using margins/padding directly in the SidebarRow
  3209. // will make the animation of the new bookmark row jump
  3210. > revealer { padding: 0 14px; }
  3211. &:selected { color: $selected_fg_color; }
  3212. &:disabled { color: $insensitive_fg_color; }
  3213. &:backdrop {
  3214. color: $backdrop_fg_color;
  3215. &:selected { color: $backdrop_selected_fg_color; }
  3216. &:disabled { color: $backdrop_insensitive_color; }
  3217. }
  3218. image.sidebar-icon {
  3219. &:dir(ltr) { padding-right: 8px; }
  3220. &:dir(rtl) { padding-left: 8px; }
  3221. }
  3222. label.sidebar-label {
  3223. &:dir(ltr) { padding-right: 2px; }
  3224. &:dir(rtl) { padding-left: 2px; }
  3225. }
  3226. @at-root button.sidebar-button {
  3227. @extend %button_basic_flat;
  3228. @extend %button_selected_flat;
  3229. min-height: 26px;
  3230. min-width: 26px;
  3231. margin-top: 3px;
  3232. margin-bottom: 3px;
  3233. padding: 0;
  3234. border-radius: 100%;
  3235. -gtk-outline-radius: 100%;
  3236. &:not(:hover):not(:active),
  3237. &:backdrop { > image { opacity: $_placesidebar_icons_opacity; }}
  3238. }
  3239. // in the sidebar case it makes no sense to click the selected row
  3240. &:selected:active { box-shadow: none; }
  3241. &.sidebar-placeholder-row {
  3242. padding: 0 8px;
  3243. min-height: 2px;
  3244. background-image: image($drop_target_color);
  3245. background-clip: content-box;
  3246. }
  3247. &.sidebar-new-bookmark-row { color: $selected_bg_color; }
  3248. &:drop(active):not(:disabled) {
  3249. color: $drop_target_color;
  3250. box-shadow: inset 0 1px $drop_target_color,
  3251. inset 0 -1px $drop_target_color;
  3252. &:selected {
  3253. color: $selected_fg_color;
  3254. background-color: $drop_target_color;
  3255. }
  3256. }
  3257. }
  3258. }
  3259. placesview {
  3260. .server-list-button > image {
  3261. transition: 200ms $ease-out-quad;
  3262. -gtk-icon-transform: rotate(0turn);
  3263. }
  3264. .server-list-button:checked > image {
  3265. transition: 200ms $ease-out-quad;
  3266. -gtk-icon-transform: rotate(-0.5turn);
  3267. }
  3268. row.activatable:hover { background-color: transparent; }
  3269. // this selects the "connect to server" label
  3270. > actionbar > revealer > box > label {
  3271. padding-left: 8px;
  3272. padding-right: 8px;
  3273. }
  3274. }
  3275. /*********
  3276. * Paned *
  3277. *********/
  3278. paned {
  3279. > separator {
  3280. min-width: 1px;
  3281. min-height: 1px;
  3282. -gtk-icon-source: none; // defeats the ugly default handle decoration
  3283. border-style: none; // just to be sure
  3284. background-color: transparent;
  3285. // workaround, using background istead of a border since the border will get rendered twice (?)
  3286. background-image: image($borders_color);
  3287. background-size: 1px 1px;
  3288. &:selected { background-image: image($selected_bg_color); } // FIXME is this needed?
  3289. &:backdrop { background-image: image($backdrop_borders_color); }
  3290. &.wide {
  3291. min-width: 5px;
  3292. min-height: 5px;
  3293. background-color: $bg_color;
  3294. background-image: image($borders_color), image($borders_color);
  3295. background-size: 1px 1px, 1px 1px;
  3296. &:backdrop {
  3297. background-color: $backdrop_bg_color;
  3298. background-image: image($backdrop_borders_color),
  3299. image($backdrop_borders_color);
  3300. }
  3301. }
  3302. }
  3303. &.horizontal > separator {
  3304. background-repeat: repeat-y;
  3305. &:dir(ltr) {
  3306. margin: 0 -8px 0 0;
  3307. padding: 0 8px 0 0;
  3308. background-position: left;
  3309. }
  3310. &:dir(rtl) {
  3311. margin: 0 0 0 -8px;
  3312. padding: 0 0 0 8px;
  3313. background-position: right;
  3314. }
  3315. &.wide {
  3316. margin: 0;
  3317. padding: 0;
  3318. background-repeat: repeat-y, repeat-y;
  3319. background-position: left, right;
  3320. }
  3321. }
  3322. &.vertical > separator {
  3323. margin: 0 0 -8px 0;
  3324. padding: 0 0 8px 0;
  3325. background-repeat: repeat-x;
  3326. background-position: top;
  3327. &.wide {
  3328. margin: 0;
  3329. padding: 0;
  3330. background-repeat: repeat-x, repeat-x;
  3331. background-position: bottom, top;
  3332. }
  3333. }
  3334. }
  3335. /**************
  3336. * GtkInfoBar *
  3337. **************/
  3338. infobar {
  3339. border-style: none;
  3340. &.action:hover > revealer > box {
  3341. background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 47%), 30%),
  3342. desaturate(darken(invert($selected_bg_color),42%), 70%));
  3343. border-bottom: 1px solid lighten($borders_color, 5%);
  3344. }
  3345. &.info,
  3346. &.question,
  3347. &.warning,
  3348. &.error {
  3349. &:backdrop > revealer > box, & > revealer > box {
  3350. label, & { color: $fg_color; }
  3351. background-color: if($variant == 'light', desaturate(lighten(invert($selected_bg_color), 45%), 30%),
  3352. desaturate(darken(invert($selected_bg_color),40%), 70%));
  3353. border-bottom: 1px solid lighten($borders_color, 5%);
  3354. }
  3355. text-shadow: none;
  3356. &:backdrop { text-shadow: none; }
  3357. button {
  3358. // FIXME: extend selection mode buttons
  3359. @include button(normal, $bg_color, $fg_color, none);
  3360. &:hover { @include button(hover, $bg_color, $fg_color, none); }
  3361. &:active,
  3362. &:checked { @include button(active, $bg_color, $fg_color, none); }
  3363. &:disabled { @include button(insensitive,$bg_color,$fg_color,none); }
  3364. &:backdrop {
  3365. @include button(backdrop, $bg_color, $fg_color, none);
  3366. border-color: _border_color($bg_color);
  3367. &:disabled {
  3368. @include button(backdrop-insensitive, $bg_color,
  3369. $fg_color, none);
  3370. border-color: _border_color($bg_color);
  3371. }
  3372. }
  3373. &:backdrop, & {
  3374. label, & { color: $fg_color; }
  3375. }
  3376. }
  3377. selection { background-color: darken($bg_color, 10%); }
  3378. *:link { color: $link_color; }
  3379. }
  3380. }
  3381. /************
  3382. * Tooltips *
  3383. ************/
  3384. tooltip {
  3385. &.background {
  3386. // background-color needs to be set this way otherwise it gets drawn twice
  3387. // see https://bugzilla.gnome.org/show_bug.cgi?id=736155 for details.
  3388. background-color: transparentize(black, 0.1);
  3389. background-clip: padding-box;
  3390. border: 1px solid $tooltip_borders_color; // this suble border is meant to
  3391. // not make the tooltip melt with
  3392. // very dark backgrounds
  3393. }
  3394. padding: 4px; /* not working */
  3395. border-radius: 5px;
  3396. box-shadow: none; // otherwise it gets inherited by windowframe.csd
  3397. text-shadow: 0 1px black;
  3398. // FIXME: we need a border or tooltips vanish on black background.
  3399. decoration { background-color: transparent; }
  3400. * { // Yeah this is ugly
  3401. padding: 2px;
  3402. background-color: transparent;
  3403. color: white;
  3404. }
  3405. }
  3406. /*****************
  3407. * Color Chooser *
  3408. *****************/
  3409. colorswatch {
  3410. // This widget is made of two boxes one on top of the other, the lower box is colorswatch {} the other one
  3411. // is colorswatch overlay {}, colorswatch has the programmatically set background, so most of the style is
  3412. // applied to the overlay box.
  3413. &:drop(active), & { border-style: none; } // FIXME: implement a proper drop(active) state
  3414. $_colorswatch_radius: 5px;
  3415. // base color corners rounding
  3416. // to avoid the artifacts caused by rounded corner anti-aliasing the base color
  3417. // sports a bigger radius.
  3418. // nth-child is needed by the custom color strip.
  3419. &.top {
  3420. border-top-left-radius: $_colorswatch_radius + 0.5px;
  3421. border-top-right-radius: $_colorswatch_radius + 0.5px;
  3422. overlay {
  3423. border-top-left-radius: $_colorswatch_radius;
  3424. border-top-right-radius: $_colorswatch_radius;
  3425. }
  3426. }
  3427. &.bottom {
  3428. border-bottom-left-radius: $_colorswatch_radius + 0.5px;
  3429. border-bottom-right-radius: $_colorswatch_radius + 0.5px;
  3430. overlay {
  3431. border-bottom-left-radius: $_colorswatch_radius;
  3432. border-bottom-right-radius: $_colorswatch_radius;
  3433. }
  3434. }
  3435. &.left,
  3436. &:first-child:not(.top) {
  3437. border-top-left-radius: $_colorswatch_radius + 0.5px;
  3438. border-bottom-left-radius: $_colorswatch_radius + 0.5px;
  3439. overlay {
  3440. border-top-left-radius: $_colorswatch_radius;
  3441. border-bottom-left-radius: $_colorswatch_radius;
  3442. }
  3443. }
  3444. &.right,
  3445. &:last-child:not(.bottom) {
  3446. border-top-right-radius: $_colorswatch_radius + 0.5px;
  3447. border-bottom-right-radius: $_colorswatch_radius + 0.5px;
  3448. overlay {
  3449. border-top-right-radius: $_colorswatch_radius;
  3450. border-bottom-right-radius: $_colorswatch_radius;
  3451. }
  3452. }
  3453. &.dark {
  3454. outline-color: transparentize(white, 0.4);
  3455. overlay {
  3456. color: white;
  3457. &:hover { border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color); }
  3458. &:backdrop { color: transparentize(white, 0.5); }
  3459. }
  3460. }
  3461. &.light {
  3462. outline-color: transparentize(black, 0.4);
  3463. overlay {
  3464. color: black;
  3465. &:hover { border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color); }
  3466. &:backdrop { color: transparentize(black, 0.5); }
  3467. }
  3468. }
  3469. &:drop(active) {
  3470. box-shadow: none;
  3471. &.light overlay {
  3472. border-color: $drop_target_color;
  3473. box-shadow: inset 0 0 0 2px if($variant == 'light', darken($drop_target_color, 7%), $borders_color),
  3474. inset 0 0 0 1px $drop_target_color;
  3475. }
  3476. &.dark overlay {
  3477. border-color: $drop_target_color;
  3478. box-shadow: inset 0 0 0 2px if($variant == 'light', transparentize(black, 0.7), $borders_color),
  3479. inset 0 0 0 1px $drop_target_color;
  3480. }
  3481. }
  3482. overlay {
  3483. border: 1px solid if($variant == 'light', transparentize(black, 0.7), $borders_color);
  3484. &:hover {
  3485. box-shadow: inset 0 1px transparentize(white, 0.6),
  3486. inset 0 -1px transparentize(black, 0.8);
  3487. }
  3488. &:backdrop, &:backdrop:hover {
  3489. border-color: if($variant == 'light', transparentize(black, 0.7), $borders_color);
  3490. box-shadow: none;
  3491. }
  3492. }
  3493. &#add-color-button {
  3494. border-radius: $_colorswatch_radius $_colorswatch_radius 0 0;
  3495. &:only-child { border-radius: $_colorswatch_radius; }
  3496. overlay {
  3497. @include button(normal);
  3498. &:hover { @include button(hover); }
  3499. &:backdrop { @include button(backdrop); }
  3500. }
  3501. }
  3502. &:disabled {
  3503. opacity: 0.5;
  3504. overlay {
  3505. border-color: transparentize(black, 0.4);
  3506. box-shadow: none;
  3507. }
  3508. }
  3509. row:selected & { box-shadow: 0 0 0 2px $selected_fg_color; }
  3510. &#editor-color-sample {
  3511. border-radius: 4px;
  3512. overlay { border-radius: 4.5px; }
  3513. }
  3514. }
  3515. // colorscale popup
  3516. colorchooser .popover.osd { border-radius: 5px; }
  3517. /********
  3518. * Misc *
  3519. ********/
  3520. //content view (grid/list)
  3521. .content-view {
  3522. background-color: darken($bg_color,7%);
  3523. &:hover { -gtk-icon-effect: highlight; }
  3524. &:backdrop { background-color: darken($bg_color,7%); }
  3525. rubberband, .rubberband { @extend rubberband; }
  3526. }
  3527. .scale-popup {
  3528. .osd & { @extend %osd; }
  3529. .osd & button.flat { //FIXME: quick hack, redo properly
  3530. border-style: none;
  3531. border-radius: 5px;
  3532. }
  3533. button { // +/- buttons on GtkVolumeButton popup
  3534. &:hover {
  3535. @extend %undecorated_button;
  3536. background-color: transparentize($fg_color,0.9);
  3537. border-radius: 5px;
  3538. }
  3539. &:backdrop { &:hover, &:disabled, & { @extend %undecorated_button; }}
  3540. }
  3541. }
  3542. /**********************
  3543. * Window Decorations *
  3544. *********************/
  3545. decoration {
  3546. border-radius: $window_radius $window_radius 0 0;
  3547. // lamefun trick to get rounded borders regardless of CSD use
  3548. border-width: 0px;
  3549. // this needs to be transparent
  3550. // see bug #722563
  3551. $_wm_border: if($variant=='light', transparentize(black, 0.77), transparentize(black, 0.25));
  3552. $_wm_border_backdrop: if($variant=='light', transparentize(black, 0.82), transparentize(black, 0.25));
  3553. box-shadow: 0 3px 9px 1px transparentize(black, 0.5),
  3554. 0 0 0 1px $_wm_border; //doing borders with box-shadow
  3555. // FIXME rationalize shadows
  3556. // this is used for the resize cursor area
  3557. margin: 10px;
  3558. &:backdrop {
  3559. // the transparent shadow here is to enforce that the shadow extents don't
  3560. // change when we go to backdrop, to prevent jumping windows.
  3561. // The biggest shadow should be in the same order then in the active state
  3562. // or the jumping will happen during the transition.
  3563. box-shadow: 0 3px 9px 1px transparent,
  3564. 0 2px 6px 2px transparentize(black, 0.8),
  3565. 0 0 0 1px $_wm_border_backdrop;
  3566. transition: $backdrop_transition;
  3567. }
  3568. .maximized &,
  3569. .fullscreen & { border-radius: 0; box-shadow: none; }
  3570. .tiled &,
  3571. .tiled-top &,
  3572. .tiled-right &,
  3573. .tiled-bottom &,
  3574. .tiled-left & {
  3575. border-radius: 0;
  3576. box-shadow: 0 0 0 1px $_wm_border,
  3577. 0 0 0 20px transparent; //transparent control workaround -- #3670
  3578. &:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop,
  3579. 0 0 0 20px transparent; // #3670
  3580. }
  3581. }
  3582. .popup & { box-shadow: none; }
  3583. // server-side decorations as used by mutter
  3584. // just doing borders, wm draws actual shadows
  3585. .ssd & { box-shadow: 0 0 0 1px $_wm_border; }
  3586. .ssd &:backdrop { box-shadow: 0 0 0 1px $_wm_border_backdrop; }
  3587. .ssd.maximized &,
  3588. .ssd.maximized &:backdrop { box-shadow: none; }
  3589. .csd.popup & {
  3590. border-radius: $menu_radius;
  3591. box-shadow: 0 1px 2px transparentize(black, 0.8),
  3592. 0 0 0 1px transparentize($_wm_border, 0.1);
  3593. }
  3594. tooltip.csd & {
  3595. border-radius: 5px;
  3596. box-shadow: none;
  3597. }
  3598. messagedialog.csd & {
  3599. border-radius: $window_radius;
  3600. box-shadow: 0 1px 2px transparentize(black, 0.8),
  3601. 0 0 0 1px transparentize($_wm_border, 0.1);
  3602. }
  3603. .solid-csd & {
  3604. margin: 0;
  3605. padding: 4px;
  3606. background-color: $borders_color;
  3607. border: solid 1px $borders_color;
  3608. border-radius: 0;
  3609. box-shadow: inset 0 0 0 3px $headerbar_color, inset 0 1px $top_hilight;
  3610. &:backdrop { box-shadow: inset 0 0 0 3px $backdrop_bg_color, inset 0 1px $top_hilight; }
  3611. }
  3612. }
  3613. // Window Close button
  3614. button.titlebutton {
  3615. @extend %button_basic;
  3616. @extend %button_basic_flat;
  3617. @include _button_text_shadow;
  3618. &:not(.appmenu) {
  3619. border-radius: 9999px;
  3620. padding: $_hb_btn_pad;
  3621. margin: 0 2px;
  3622. min-width: 0;
  3623. min-height: 0;
  3624. }
  3625. .selection-mode & {
  3626. @extend %selection_mode_button_flat;
  3627. @extend %nobg_selected_items;
  3628. }
  3629. &:backdrop { -gtk-icon-shadow: none; }
  3630. }
  3631. .selection-mode headerbar button.titlebutton,
  3632. .selection-mode .titlebar button.titlebutton,
  3633. headerbar.selection-mode button.titlebutton,
  3634. .titlebar.selection-mode button.titlebutton {
  3635. @include _button_text_shadow(white, $suggested_bg_color);
  3636. &:backdrop { -gtk-icon-shadow: none; }
  3637. }
  3638. // catch all extend :)
  3639. %selected_items {
  3640. background-color: $selected_bg_color;
  3641. @at-root %nobg_selected_items, & {
  3642. color: $selected_fg_color;
  3643. @at-root %selected_items_disabled,
  3644. &:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
  3645. @at-root %selected_items_backdrop,
  3646. &:backdrop {
  3647. color: $backdrop_selected_fg_color;
  3648. &:disabled { color: mix($backdrop_selected_fg_color, $selected_bg_color, 30%); }
  3649. }
  3650. }
  3651. }
  3652. .monospace { font-family: monospace; }
  3653. /**********************
  3654. * Touch Copy & Paste *
  3655. *********************/
  3656. //touch selection handlebars for the Popover.osd above
  3657. cursor-handle {
  3658. background-color: transparent;
  3659. background-image: none;
  3660. box-shadow: none;
  3661. border-style: none;
  3662. @each $s,$as in ('',''),
  3663. (':hover','-hover'),
  3664. (':active','-active') { //no need for insensitive and backdrop
  3665. &.top#{$s}:dir(ltr), &.bottom#{$s}:dir(rtl) {
  3666. $_url: 'assets/text-select-start#{$as}#{$asset_suffix}';
  3667. -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
  3668. url('#{$_url}@2.png'));
  3669. padding-left: 10px;
  3670. }
  3671. &.bottom#{$s}:dir(ltr), &.top#{$s}:dir(rtl) {
  3672. $_url: 'assets/text-select-end#{$as}#{$asset_suffix}';
  3673. -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
  3674. url('#{$_url}@2.png'));
  3675. padding-right: 10px;
  3676. }
  3677. &.insertion-cursor#{$s}:dir(ltr), &.insertion-cursor#{$s}:dir(rtl) {
  3678. $_url: 'assets/slider-horz-scale-has-marks-above#{$as}#{$asset_suffix}';
  3679. -gtk-icon-source: -gtk-scaled(url('#{$_url}.png'),
  3680. url('#{$_url}@2.png'));
  3681. }
  3682. }
  3683. }
  3684. .context-menu { font: initial; } // Decouple the font of context menus from their entry/textview
  3685. // shortcut window keys
  3686. .keycap {
  3687. min-width: 20px;
  3688. min-height: 25px;
  3689. margin-top: 2px;
  3690. padding-bottom: 3px;
  3691. padding-left: 6px;
  3692. padding-right: 6px;
  3693. color: $fg_color;
  3694. background-color: $base_color;
  3695. border: 1px solid;
  3696. border-color: if($variant == 'light', mix($borders_color, $bg_color, 50%), $borders_color);
  3697. border-radius: 5px;
  3698. box-shadow: if($variant == 'light', inset 0 -3px mix($base_color, $bg_color, 20%), inset 0 -3px mix($borders_color, $base_color, 60%));
  3699. font-size: smaller;
  3700. &:backdrop {
  3701. background-color: $backdrop_base_color;
  3702. color: $backdrop_fg_color;
  3703. transition: $backdrop_transition;
  3704. }
  3705. }
  3706. :not(decoration):not(window):drop(active):focus,
  3707. :not(decoration):not(window):drop(active) { // FIXME needs to be done widget by widget, this wildcard should really die
  3708. border-color: $drop_target_color;
  3709. box-shadow: inset 0 0 0 1px $drop_target_color;
  3710. caret-color: $drop_target_color;
  3711. }
  3712. stackswitcher button.text-button { min-width: 100px; } // FIXME aggregate with buttons
  3713. stackswitcher button.circular,
  3714. stackswitcher button.text-button.circular { // FIXME aggregate with buttons
  3715. min-width: 32px;
  3716. min-height: 32px;
  3717. padding: 0;
  3718. }
  3719. /*************
  3720. * App Icons *
  3721. *************/
  3722. /* Outline for low res icons */
  3723. .lowres-icon {
  3724. -gtk-icon-shadow: 0 -1px rgba(0,0,0,0.05),
  3725. 1px 0 rgba(0,0,0,0.1),
  3726. 0 1px rgba(0,0,0,0.3),
  3727. -1px 0 rgba(0,0,0,0.1);
  3728. }
  3729. /* Dropshadow for large icons */
  3730. .icon-dropshadow {
  3731. -gtk-icon-shadow: 0 1px 12px rgba(0,0,0,0.05),
  3732. 0 -1px rgba(0,0,0,0.05),
  3733. 1px 0 rgba(0,0,0,0.1),
  3734. 0 1px rgba(0,0,0,0.3),
  3735. -1px 0 rgba(0,0,0,0.1);
  3736. }
  3737. /*********
  3738. * Emoji *
  3739. ********/
  3740. popover.emoji-picker {
  3741. padding-left: 0;
  3742. padding-right: 0;
  3743. entry.search { margin: 3px 5px 5px 5px; }
  3744. }
  3745. button.emoji-section {
  3746. border-color: transparent;
  3747. border-width: 3px;
  3748. border-style: none none solid;
  3749. border-radius: 0;
  3750. margin: 2px 4px 2px 4px;
  3751. padding: 3px 0 0;
  3752. min-width: 32px;
  3753. min-height: 28px;
  3754. /* reset props inherited from the button style */
  3755. background: none;
  3756. box-shadow: none;
  3757. text-shadow: none;
  3758. outline-offset: -5px;
  3759. &:first-child { margin-left: 7px; }
  3760. &:last-child { margin-right: 7px; }
  3761. &:backdrop:not(:checked) { border-color: transparent; }
  3762. &:hover { border-color: if($variant == 'light', $borders_color, transparentize($fg_color, .9)); }
  3763. &:checked { border-color: $selected_bg_color; }
  3764. label {
  3765. padding: 0;
  3766. opacity: 0.55;
  3767. }
  3768. &:hover label { opacity: 0.775; }
  3769. &:checked label { opacity: 1; }
  3770. }
  3771. popover.emoji-picker .emoji {
  3772. font-size: x-large;
  3773. padding: 6px;
  3774. :hover {
  3775. background: $selected_bg_color;
  3776. border-radius: 6px;
  3777. }
  3778. }
  3779. popover.emoji-completion arrow {
  3780. border: none;
  3781. background: none;
  3782. }
  3783. popover.emoji-completion contents row box {
  3784. padding: 2px 10px;
  3785. }
  3786. popover.emoji-completion .emoji:hover {
  3787. background: $popover_hover_color;
  3788. }