Advertisement
Guest User

Untitled

a guest
Sep 11th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.28 KB | None | 0 0
  1. /**
  2.  * Copyright 2016 Label Blanc (http://www.labelblanc.ca/)
  3.  *
  4.  * This file is part of the "Improved Save Button"
  5.  * Wordpress plugin.
  6.  *
  7.  * The "Improved Save Button" Wordpress plugin
  8.  * is free software: you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation, either version 3 of the License, or
  11.  * (at your option) any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  20.  */
  21.  
  22. /**
  23.  * Styles for the new button set (the main button + the dropdown button +
  24.  * the dropdown menu) added on the post edit page.
  25.  *
  26.  * Note that a right-to-left stylesheet based on the one compiled from this
  27.  * file can be generated with one of the Grunt tasks.
  28.  */
  29.  
  30. $lb-sat-media-query-sm: "screen and (max-width: 782px)";
  31.  
  32. /**
  33.  * Separator between the original and the new publish button
  34.  */
  35. .lb-sat-separator {
  36.     height: 10px;
  37.     float: none !important;
  38.  
  39.     @media #{$lb-sat-media-query-sm} {
  40.         height: 0;
  41.     }
  42. }
  43.  
  44. /**
  45.  * Class added to the spinner that redefines some styles
  46.  */
  47. .lb-sat-spinner {
  48.     #publishing-action & {
  49.         visibility: hidden;
  50.         display: inline-block;
  51.         float: none;
  52.  
  53.         &.is-active {
  54.             visibility: visible;
  55.         }
  56.     }
  57. }
  58.  
  59. /**
  60.  * Container of the new button set
  61.  */
  62. .lb-sat-container {
  63.     position: relative;
  64.     white-space: nowrap;
  65.     display: inline-block;
  66.  
  67.     // When the dropdown menu has to be shown.
  68.     // Other elements below also have styles with this class.
  69.     &.lb-sat-dropdown-menu-shown {
  70.  
  71.         .lb-sat-dropdown-menu {
  72.             display: block;
  73.         }
  74.     }
  75. }
  76.  
  77. /**
  78.  * The main button
  79.  */
  80. .lb-sat-main-button {
  81.     vertical-align: top;
  82.  
  83.     .wp-core-ui .lb-sat-with-dropdown &.button {
  84.         -webkit-border-bottom-right-radius: 0;
  85.                 border-bottom-right-radius: 0;
  86.         -webkit-border-top-right-radius: 0;
  87.                 border-top-right-radius: 0;
  88.         border-right-style: none;
  89.         margin: 0 !important;
  90.         float: none !important;
  91.  
  92.         &.button-large {
  93.             padding-right: 8px;
  94.         }
  95.     }
  96.  
  97.     // Icon alignment
  98.     .dashicons {
  99.         vertical-align: text-bottom;
  100.     }
  101. }
  102.  
  103. /**
  104.  * The dropdown button, shown beside the main button
  105.  */
  106. .lb-sat-dropdown-button {
  107.     // Overwite some Wordpress styles
  108.     .wp-core-ui &.button {
  109.         -webkit-border-bottom-left-radius: 0;
  110.                 border-bottom-left-radius: 0;
  111.         -webkit-border-top-left-radius: 0;
  112.                 border-top-left-radius: 0;
  113.         border-left-style: none;
  114.  
  115.         // Icon font properties
  116.         font: 400 18px/1 dashicons;
  117.         speak: none;
  118.         -webkit-font-smoothing: antialiased;
  119.         -moz-osx-font-smoothing: grayscale;
  120.         margin: 0px !important;
  121.  
  122.         &.button-large {
  123.             padding: 0 6px 0 4px;
  124.  
  125.             @media #{$lb-sat-media-query-sm} {
  126.                 padding-top: 6px;
  127.                 padding-bottom: 6px;
  128.             }
  129.         }
  130.  
  131.         @media #{$lb-sat-media-query-sm} {
  132.             font-size: 19px;
  133.         }
  134.     }
  135.  
  136.     .wp-core-ui .lb-sat-dropdown-menu-shown &.button {
  137.         background-color: #EEE;
  138.         border-color: #999;
  139.         -webkit-box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
  140.                 box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5);
  141.     }
  142.  
  143.     // When the dropdown menu must be shown
  144.     .wp-core-ui .lb-sat-dropdown-menu-shown.lb-sat-set-as-default &.button {
  145.         background-color: #1B7AA6;
  146.         border-color: #005684;
  147.         -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
  148.                 box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
  149.     }
  150. }
  151.  
  152. /**
  153.  * The dropdown menu
  154.  */
  155. .lb-sat-dropdown-menu {
  156.     position: absolute;
  157.     display: none;
  158.     right: 0;
  159.     top: 100%;
  160.     border: 1px solid #DDD;
  161.     z-index: 2;
  162.     background-color: white;
  163.     -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  164.     box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  165.     text-align: left;
  166.     margin: 3px 0 0;
  167.     min-width: 100%;
  168.  
  169.     li {
  170.         cursor: pointer;
  171.         margin: 0;
  172.         padding: 4px 12px;
  173.         white-space: nowrap;
  174.  
  175.         &.disabled {
  176.             opacity: 0.5;
  177.             cursor: default;
  178.  
  179.             &:hover {
  180.                 color: inherit;
  181.                 background-color: transparent;
  182.             }
  183.         }
  184.  
  185.         &:hover {
  186.             color: white;
  187.             background-color: #1E8CBE;
  188.         }
  189.     }
  190. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement