UNPKG

topcoat-icon-button

Version:

Topcoat icon button skin

301 lines (273 loc) 7.18 kB
@font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Light.otf'); font-weight: 200; } @font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Semibold.otf'); font-weight: 600; } html { font-size: 12px; } body { margin: 0; padding: 0; font-family: "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 400; background: hsla(200, 2%, 30%, 1); } :focus { outline-color: transparent; outline-style: none; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { padding: 0; margin: 0; font: inherit; color: inherit; background: transparent; border: none; } .topcoat-icon-button--quiet, .topcoat-icon-button--large--quiet { background: transparent; border: 1px solid transparent; box-shadow: none; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { box-sizing: border-box; background-clip: padding-box; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { white-space: nowrap; overflow: hidden; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet, .topcoat-icon, .topcoat-icon--large { position: relative; display: inline-block; vertical-align: top; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { text-overflow: ellipsis; } .topcoat-icon-button:disabled, .topcoat-icon-button--quiet:disabled, .topcoat-icon-button--large:disabled, .topcoat-icon-button--large--quiet:disabled { opacity: .3; cursor: default; pointer-events: none; } .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { text-decoration: none; } /* topdoc name: Icon Button description: Like button, but it has an icon. modifiers: :active: Active state :disabled: Disabled state :hover: Hover state :focus: Focused markup: <button class="topcoat-icon-button"> <span class="topcoat-icon" style="background-color:#A5A7A7;"></span> </button> <button class="topcoat-icon-button" disabled> <span class="topcoat-icon" style="background-color:#A5A7A7;"></span> </button> tags: - desktop - light - mobile - button - icon */ .topcoat-icon-button, .topcoat-icon-button--quiet, .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { padding: 0 .25rem; line-height: 1.313rem; letter-spacing: 0; color: hsla(180, 2%, 78%, 1); text-shadow: 0 -1px hsla(0, 0%, 0%, .69); vertical-align: baseline; background-color: hsla(180, 1%, 35%, 1); box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); border: 1px solid hsla(180, 1%, 20%, 1); border-radius: 4px; } .topcoat-icon-button:hover, .topcoat-icon-button--quiet:hover, .topcoat-icon-button--large:hover, .topcoat-icon-button--large--quiet:hover { background-color: hsla(200, 2%, 39%, 1); } .topcoat-icon-button:focus, .topcoat-icon-button--quiet:focus, .topcoat-icon-button--quiet:hover:focus, .topcoat-icon-button--large:focus, .topcoat-icon-button--large--quiet:focus, .topcoat-icon-button--large--quiet:hover:focus { border: 1px solid hsla(227, 100%, 50%, 1); box-shadow: inset 0 1px hsla(0, 100%, 100%, .36), 0 0 0 2px hsla(208, 82%, 69%, 1); outline: 0; } .topcoat-icon-button:active, .topcoat-icon-button--quiet:active, .topcoat-icon-button--large:active, .topcoat-icon-button--large--quiet:active, .topcoat-icon-button--large--quiet:focus:active { border: 1px solid hsla(180, 1%, 20%, 1); background-color: hsla(210, 2%, 25%, 1); box-shadow: inset 0 1px hsla(0, 0%, 0%, .05); } /* topdoc name: Quiet Icon Button description: Like quiet button, but it has an icon. modifiers: :active: Active state :disabled: Disabled state :hover: Hover state :focus: Focused markup: <button class="topcoat-icon-button--quiet"> <span class="topcoat-icon" style="background-color:#A5A7A7;"></span> </button> <button class="topcoat-icon-button--quiet" disabled> <span class="topcoat-icon" style="background-color:#A5A7A7;"></span> </button> tags: - desktop - light - mobile - button - icon - quiet */ .topcoat-icon-button--quiet:hover, .topcoat-icon-button--large--quiet:hover { text-shadow: 0 -1px hsla(0, 0%, 0%, .69); border: 1px solid hsla(180, 1%, 20%, 1); box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); } .topcoat-icon-button--quiet:active, .topcoat-icon-button--quiet:focus:active, .topcoat-icon-button--large--quiet:active, .topcoat-icon-button--large--quiet:focus:active, .topcoat-icon-button--large--quiet:focus:focus:active { color: hsla(180, 2%, 78%, 1); text-shadow: 0 -1px hsla(0, 0%, 0%, .69); background-color: hsla(210, 2%, 25%, 1); border: 1px solid hsla(180, 1%, 20%, 1); box-shadow: inset 0 1px hsla(0, 0%, 0%, .05); } /* topdoc name: Large Icon Button description: Like large button, but it has an icon. modifiers: :active: Active state :disabled: Disabled state :hover: Hover state :focus: Focused markup: <button class="topcoat-icon-button--large"> <span class="topcoat-icon--large" style="background-color:#A5A7A7;"></span> </button> <button class="topcoat-icon-button--large" disabled> <span class="topcoat-icon--large" style="background-color:#A5A7A7;"></span> </button> tags: - desktop - light - mobile - button - icon - large */ .topcoat-icon-button--large, .topcoat-icon-button--large--quiet { width: 1.688rem; height: 1.688rem; line-height: 1.688rem; } /* topdoc name: Large Quiet Icon Button description: Like large button, but it has an icon and this one is quiet. modifiers: :active: Active state :disabled: Disabled state :hover: Hover state markup: <button class="topcoat-icon-button--large--quiet"> <span class="topcoat-icon--large" style="background-color:#A5A7A7;"></span> </button> <button class="topcoat-icon-button--large--quiet" disabled> <span class="topcoat-icon--large" style="background-color:#A5A7A7;"></span> </button> tags: - desktop - light - mobile - button - icon - large - quiet */ .topcoat-icon, .topcoat-icon--large { overflow: hidden; width: .81406rem; height: .81406rem; vertical-align: middle; top: -1px; } .topcoat-icon--large { width: 1.06344rem; height: 1.06344rem; top: -2px; }