1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +01:00
phorge-phorge/webroot/rsrc/css/phui/phui-button.css
Chad Little 2864e4ff0d Tweak action buttons for desktop/tablet/mobile
Summary: Minor spacing updates for viewing buttons that collapse with icons. Also, minor ghost icon perfection tweak.

Test Plan: test diffusion, action menu buttons, ghost buttons at all break points.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12658
2015-05-02 09:59:21 -07:00

395 lines
6.8 KiB
CSS

/**
* @provides phui-button-css
*/
button,
a.button {
font: {$basefont};
-webkit-font-smoothing: antialiased;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
button.phabricator-action-view-item {
-webkit-font-smoothing: auto;
}
button::-moz-focus-inner {
padding: 0;
border: 0;
}
button,
a.button,
a.button:visited,
input[type="submit"] {
background-color: {$blue};
border: 1px solid {$blue};
color: white;
cursor: pointer;
font-weight: bold;
font-size: 13px;
display: inline-block;
padding: 4px 14px 5px;
text-align: center;
white-space: nowrap;
border-radius: 3px;
}
/* Buttons with images (full size only) */
button.icon,
a.icon,
a.icon:visited {
padding-left: 0;
position: relative;
text-indent: 29px;
}
button.green,
a.green,
a.green:visited {
background-color: {$green};
border-color: {$green};
}
button.grey,
input[type="submit"].grey,
a.grey,
a.grey:visited {
background-color: {$lightgreybackground};
border-color: {$lightgreyborder};
color: {$darkgreytext};
}
button.simple,
input[type="submit"].simple,
a.simple,
a.simple:visited {
background-color: transparent;
background-image: none;
border: 1px solid transparent;
color: {$bluetext};
border: 1px solid {$lightblueborder};
}
a.disabled,
button.disabled,
button[disabled] {
filter:alpha(opacity=50);
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
a.phuix-dropdown-open {
color: {$greytext};
}
a.button:hover,
button:hover {
text-decoration: none;
background-color: {$sky};
}
a.button.grey:hover,
button.grey:hover {
background-color: #fff;
}
a.button.green:hover,
button.green:hover {
background-color: #0DAD48;
}
a.button.simple:hover,
button.simple:hover {
background-color: #fff;
border-color: {$blueborder};
background-image: none;
border-bottom-color: {$darkblueborder};
box-shadow: none;
text-decoration: none;
}
a.button.simple .phui-icon-view {
border: none;
}
a.button.simple.phuix-dropdown-open {
background-color: #fff;
box-shadow: none;
}
body a.button.disabled:hover,
body button.disabled:hover,
body a.button.disabled:active,
body button.disabled:active {
box-shadow: none;
}
button.small,
a.small,
a.small:visited {
padding: 2px 8px;
height: auto;
font-size: 11px;
line-height: 16px;
}
button.link {
display: inline;
border: none;
background: transparent;
font-weight: normal;
padding: 0;
margin: 0;
font-size: inherit;
border-bottom: none;
text-decoration: none;
color: #19558D;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
button.link:hover {
text-decoration: underline;
}
.phuix-dropdown-menu {
position: absolute;
width: 240px;
background: #fff;
margin-top: -1px;
padding: 5px 0;
box-shadow: {$dropshadow};
border: 1px solid {$lightgreyborder};
border-bottom: 1px solid {$greyborder};
border-radius: 3px;
margin-bottom: 16px;
}
.phuix-dropdown-menu a:focus {
/* We automatically focus links in dropdown menus for assistive devices, but
this is distracting for visual user agents. */
outline: none;
}
a.policy-control {
width: 240px;
text-align: left;
}
a.policy-control .caret {
float: right;
}
a.toggle {
display: inline-block;
padding: 4px 8px;
font-size: 12px;
font-weight: bold;
color: #555;
text-decoration: none;
white-space: nowrap;
vertical-align: baseline;
background-color: {$lightgreybackground};
margin: 0 6px 0 0;
border-radius: 3px;
box-shadow: inset 0 0 3px rgba(0,0,0,.4);
}
a.toggle:hover {
background-color: #14568e;
color: #fff
}
a.toggle-selected {
background-color: #14568e;
color: #fff
}
a.toggle-fixed {
cursor: default;
}
.caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
border-top: 5px solid #fff;
border-right: 5px solid transparent;
border-left: 5px solid transparent;
content: "";
}
.caret-right {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-left: 7px solid {$greytext};
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
content: "";
margin-bottom: 4px;
}
.caret-left {
display: inline-block;
width: 0;
height: 0;
vertical-align: middle;
border-right: 7px solid {$greytext};
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
content: "";
margin-bottom: 4px;
}
.dropdown .caret {
margin-top: 7px;
margin-left: 6px;
}
.small.dropdown .caret {
margin-top: 6px;
}
.grey.dropdown .caret {
border-top-color: #000;
}
/* Icons */
.button.has-icon {
position: relative;
}
.button .phui-icon-view {
display: inline-block;
position: absolute;
top: 6px;
left: 12px;
}
.phui-button-bar .button .phui-icon-view {
left: 11px;
}
.button.has-icon .phui-button-text {
margin-left: 16px;
}
/* Login Buttons */
.button.big.has-icon {
padding: 6px 20px 6px 12px;
border-radius: 4px;
text-align: left;
}
.button.big.has-icon .phui-button-text {
margin-left: 40px;
font-size: 14px;
display: block;
}
.button.big.has-icon .phui-button-subtext {
color: {$lightgreytext};
font-size: 12px;
line-height: 15px;
font-weight: normal;
}
/* PHUI Button Bar */
.phui-button-bar a.button.has-icon {
display: inline-block;
height: 16px;
width: 6px;
}
.phui-button-bar .phui-button-bar-first {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
.phui-button-bar .phui-button-bar-middle {
border-radius: 0;
border-left: none;
}
.phui-button-bar .phui-button-bar-last {
border-left: none;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
.phui-button-bar .button.simple:hover {
border-color: {$lightblueborder};
color: {$sky};
}
.phui-button-bar .button.simple:hover .phui-icon-view {
border-color: {$lightblueborder};
color: {$sky};
}
/* Simple Button Colors */
a.simple.simple-blue,
button.simple.simple-blue {
border-color: {$blue};
background: {$lightblue};
color: {$blue};
}
a.simple.simple-blue:hover,
button.simple.simple-blue:hover {
color: {$blue};
border-color: {$blue};
}
a.simple.simple-blue .phui-icon-view,
button.simple.simple-blue .phui-icon-view {
color: {$blue};
}
a.simple.simple-yellow,
button.simple.simple-yellow {
border-color: #bc7837;
background: {$lightyellow};
color: #bc7837;
}
a.simple.simple-yellow:hover,
button.simple.simple-yellow:hover {
color: #bc7837;
border-color: #bc7837;
}
a.simple.simple-yellow .phui-icon-view,
button.simple.simple-yellow .phui-icon-view {
color: #bc7837;
}
a.simple.simple-grey,
button.simple.simple-grey {
border-color: {$greyborder};
background: {$lightgreybackground};
color: {$greytext};
}
a.simple.simple-grey:hover,
button.simple.simple-grey:hover {
color: {$greytext};
border-color: {$greyborder};
}
a.simple.simple-grey .phui-icon-view,
button.simple.simple-grey .phui-icon-view {
color: {$greytext};
}