_widgets.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. .widget-area {
  2. z-index: 0;
  3. position: relative;
  4. background: $color__background-body;
  5. }
  6. .widget {
  7. border-top: 1px solid $color__border-transparent;
  8. display: table;
  9. padding: $mobile-baseline 0;
  10. margin: 0;
  11. width: 100%;
  12. & > ul,
  13. & > div > ul {
  14. list-style: none;
  15. margin: 0;
  16. }
  17. // Make sure select elements fit in widgets.
  18. select {
  19. max-width: 100%;
  20. }
  21. .hfeed &:first-of-type {
  22. border-top: none;
  23. }
  24. & > table {
  25. border-top: none;
  26. td {
  27. border-bottom: none;
  28. }
  29. }
  30. &:first-of-type {
  31. border-top: none;
  32. }
  33. }
  34. .widget > *:not(.widget-title) {
  35. float: left;
  36. @include gutter-width( 100% );
  37. word-break: break-word;
  38. }
  39. .widget-title {
  40. @include widget-title();
  41. color: $color__link-hover;
  42. @include gutter-width( 100% );
  43. margin: 0 0 ($baseline * .5);
  44. }
  45. #secondary {
  46. border-top: 1px solid $color__border-transparent;
  47. .widget_calendar {
  48. position: relative;
  49. caption {
  50. margin-bottom: ( $baseline * .5 );
  51. color: $color__link-hover;
  52. }
  53. }
  54. .widget_rss {
  55. .widget-title {
  56. display: flex;
  57. flex-direction: column-reverse;
  58. a {
  59. display: inline-block;
  60. word-break: break-all;
  61. }
  62. }
  63. li {
  64. margin-bottom: $baseline;
  65. .rsswidget {
  66. @include article-title( 1.125 );
  67. display: block;
  68. margin-bottom: ($baseline * .2);
  69. }
  70. .rss-date {
  71. @include list-item();
  72. @include font-size(.875);
  73. color: $color__text-input;
  74. margin-bottom: ($baseline * .5);
  75. padding: 0;
  76. }
  77. .rssSummary {
  78. margin-bottom: ( $baseline * .5 );
  79. }
  80. cite {
  81. margin-right: $gutter;
  82. }
  83. }
  84. }
  85. .widget_search {
  86. .search-form {
  87. float: left;
  88. width: calc( 100% - #{ $gutter } );
  89. }
  90. .search-field {
  91. margin: 0 0 ( $baseline * .5 );
  92. padding: 10px ( $gutter / 2 );
  93. width: calc( 100% - #{ $gutter } );
  94. }
  95. .search-submit {
  96. clear: both;
  97. float: none;
  98. }
  99. }
  100. .widget_wpcom_social_media_icons_widget .genericon {
  101. font-size: $baseline;
  102. }
  103. }
  104. @include breakpoint(phablet) {
  105. .widget {
  106. padding: ( $baseline * 1.5 ) 0;
  107. }
  108. }
  109. @include breakpoint(tablet) {
  110. .widget {
  111. margin: 0;
  112. }
  113. .widget > *:not(.widget-title) {
  114. @include gutter-width( ( 100% / 8 ) * 3 );
  115. }
  116. .widget-title {
  117. float: left;
  118. width: ( 100% / 8 ) * 2;
  119. }
  120. #secondary {
  121. .widget_calendar {
  122. position: relative;
  123. .calendar_wrap {
  124. width: ( ( 100% / 8 ) * 5 );
  125. margin-left: calc( 25% );
  126. }
  127. .widget-title {
  128. margin-right: -25%;
  129. }
  130. .widget-title + .calendar_wrap {
  131. margin-left: calc( 25% );
  132. }
  133. table {
  134. text-align: left;
  135. }
  136. td,
  137. th {
  138. padding: ($gutter * .5);
  139. }
  140. caption {
  141. color: $color__link-hover;
  142. padding: 0 ( $gutter * .5 );
  143. margin-bottom: ( $baseline * .5 );
  144. text-align: left;
  145. }
  146. }
  147. .widget_blog_subscription > *:not(.widget-title),
  148. .widget-gallery > *:not(.widget-title),
  149. .widget_media_gallery > *:not(.widget-title),
  150. .widget_tag_cloud .tagcloud,
  151. .widget_tag_cloud > *:not(.widget-title),
  152. .widget_text .textwidget,
  153. .widget_media_image > *:not(.widget-title) {
  154. @include gutter-width( ( 100% / 8 ) * 5 );
  155. }
  156. .widget_media_video > *:not(.widget-title),
  157. .widget_media_audio > *:not(.widget-title) {
  158. width: 100%;
  159. }
  160. .widget_search {
  161. padding-left: 0;
  162. padding-right: 0;
  163. .widget-title {
  164. margin-right: -25%;
  165. }
  166. .search-form {
  167. margin-left: calc( 27.5% - #{ $gutter } );
  168. width: calc( 62.5% );
  169. }
  170. }
  171. .widget_nav_menu > * {
  172. float: right;
  173. @include gutter-width( 75% );
  174. }
  175. }
  176. }
  177. @include breakpoint(laptop) {
  178. .widget-area-wrap {
  179. padding: 0 5%;
  180. }
  181. }