184 lines
3.8 KiB
CSS
184 lines
3.8 KiB
CSS
|
/*
|
||
|
* SPDX-FileCopyrightText: 2019 Free Software Foundation Europe e.V. <https://fsfe.org>
|
||
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||
|
*
|
||
|
* share-buttons: Share buttons for many social networks and services
|
||
|
* Upstream: https://git.fsfe.org/FSFE/share-buttons
|
||
|
*/
|
||
|
|
||
|
/* ********
|
||
|
* GENERAL LOOK FOR ALL BUTTONS
|
||
|
* ********/
|
||
|
|
||
|
@import url('buttons-services.css');
|
||
|
|
||
|
.share-buttons {
|
||
|
font-size: 1em;
|
||
|
margin: 2em 0;
|
||
|
color: initial;
|
||
|
}
|
||
|
|
||
|
.share-buttons a.button,
|
||
|
.share-buttons button.button,
|
||
|
.share-buttons label.button {
|
||
|
background-position: left 5px center;
|
||
|
background-repeat: no-repeat;
|
||
|
background-size: 20px auto;
|
||
|
border: none;
|
||
|
border-radius: 3px;
|
||
|
box-sizing: content-box;
|
||
|
color: #fff;
|
||
|
cursor: pointer;
|
||
|
display: inline-block;
|
||
|
font-family: sans-serif;
|
||
|
font-size: 1em;
|
||
|
font-weight: normal;
|
||
|
height: 14px;
|
||
|
margin: 2.5px 5px 2.5px 0;
|
||
|
/*max-width: 110px;*/
|
||
|
min-width: 84px;
|
||
|
opacity: 0.9;
|
||
|
padding: 7px 7px 7px 20px;
|
||
|
text-align: center;
|
||
|
text-decoration: none;
|
||
|
transition: box-shadow 100ms linear;
|
||
|
vertical-align: top;
|
||
|
}
|
||
|
|
||
|
/* Darken buttons on hover */
|
||
|
.share-buttons .button {
|
||
|
box-shadow: none;
|
||
|
}
|
||
|
|
||
|
.share-buttons .button:hover {
|
||
|
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.2);
|
||
|
}
|
||
|
|
||
|
/* Separate share buttons form from possibly floating content */
|
||
|
.share-buttons {
|
||
|
clear: both;
|
||
|
}
|
||
|
|
||
|
/* Hide something */
|
||
|
.n {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
/* Share pop-up behaviour hacks */
|
||
|
.share-buttons input[type="radio"],
|
||
|
.share-buttons input[type="radio"] + span,
|
||
|
.share-buttons input[type="checkbox"],
|
||
|
.share-buttons input[type="checkbox"] + span {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.share-buttons input[type="radio"]:checked + span,
|
||
|
.share-buttons input[type="checkbox"]:checked + span {
|
||
|
background-color: #333;
|
||
|
border-radius: .5em;
|
||
|
display: inline-block;
|
||
|
margin-left: -10em;
|
||
|
margin-top: 3.5em;
|
||
|
padding: .5em;
|
||
|
position: absolute;
|
||
|
z-index: 3;
|
||
|
}
|
||
|
|
||
|
.share-buttons input[type="radio"]:checked + span:before,
|
||
|
.share-buttons input[type="checkbox"]:checked + span:before {
|
||
|
border-bottom: 1em solid #333;
|
||
|
border-left: 1em solid transparent;
|
||
|
border-right: 1em solid transparent;
|
||
|
content: '';
|
||
|
height: 0;
|
||
|
position: absolute;
|
||
|
top: -1em;
|
||
|
width: 0;
|
||
|
z-index: 3;
|
||
|
}
|
||
|
|
||
|
.share-buttons input[type="radio"] + span > * {
|
||
|
vertical-align: middle;
|
||
|
}
|
||
|
|
||
|
.share-buttons input[type="radio"] + span > button {
|
||
|
font-size: 1em;
|
||
|
font-weight: normal;
|
||
|
line-height: normal;
|
||
|
margin: 2.5px 0 2.5px 5px;
|
||
|
min-width: 4em;
|
||
|
padding: .25em;
|
||
|
}
|
||
|
|
||
|
.share-buttons input[type="radio"] + span > label {
|
||
|
background-color: rgba(0, 0, 0, .5);
|
||
|
bottom: 0;
|
||
|
left: 0;
|
||
|
position: fixed;
|
||
|
right: 0;
|
||
|
top: 0;
|
||
|
z-index: -1;
|
||
|
}
|
||
|
|
||
|
/* parent class to put buttons inline vertical-aligned */
|
||
|
.inline-buttons {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
.inline-buttons .share-buttons {
|
||
|
margin: 0 0 0 5px;
|
||
|
}
|
||
|
|
||
|
/* ********
|
||
|
* FLOATING SIDE BUTTONS
|
||
|
* ********/
|
||
|
|
||
|
.share-buttons.side {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
left: 0;
|
||
|
padding: .1vh .5vh;
|
||
|
position: fixed;
|
||
|
top: 30%;
|
||
|
z-index: 10;
|
||
|
}
|
||
|
|
||
|
@media (max-width: 767px) {
|
||
|
.share-buttons.side {
|
||
|
display: none !important;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.share-buttons.side a.button,
|
||
|
.share-buttons.side button.button,
|
||
|
.share-buttons.side label.button {
|
||
|
background-color: #474747;
|
||
|
background-position: center center;
|
||
|
background-repeat: no-repeat;
|
||
|
background-size: 2.7vh auto;
|
||
|
box-sizing: border-box;
|
||
|
color: #000;
|
||
|
font-size: 0;
|
||
|
height: 4vh;
|
||
|
min-width: 0;
|
||
|
width: 4vh;
|
||
|
}
|
||
|
|
||
|
/* Share pop-up behaviour */
|
||
|
.share-buttons.side input[type="radio"]:checked + span,
|
||
|
.share-buttons.side input[type="checkbox"]:checked + span {
|
||
|
margin-left: 0;
|
||
|
padding: .5em;
|
||
|
width: 300px;
|
||
|
}
|
||
|
|
||
|
/* Media Query to resize social links for portrait tablet view */
|
||
|
@media screen and (max-height: 770px) {
|
||
|
.share-buttons.side button.button,
|
||
|
.share-buttons.side label.button {
|
||
|
background-size: 3.7vh auto;
|
||
|
height: 6vh;
|
||
|
width: 6vh;
|
||
|
}
|
||
|
}
|