Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Button/style.css: Difference between revisions

Template page
No edit summary
(reverting because this one worked better)
Tag: Manual revert
Line 1: Line 1:
/* Button.css */
/* Button.css */
.tpl-button {
.tpl-button {
    display: inline-block;
     position:relative;
     position:relative;
     padding: 4px 10px;
     padding: 4px 10px;
Line 7: Line 8:
     border-radius: 8px;
     border-radius: 8px;
     font-weight: bold;
     font-weight: bold;
    text-align:center;
     cursor: pointer;
     cursor: pointer;
line-height:1;
line-height:1;
Line 13: Line 13:
}
}


.tpl-button a, .tpl-button a:hover, .tpl-button a p, .tpl-button a p:hover{
.tpl-button p{
text-decoration:none;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
 
.tpl-button-center > a, .tpl-button-left > a, .tpl-button-right > a{
height:40px;
width:100%;
}
 
.tpl-button-center > a,.tpl-button-left > a,.tpl-button-right > a{
height:100%;
}
}


Line 31: Line 44:
display: flex;
display: flex;
justify-content: flex-end;
justify-content: flex-end;
}
.tpl-button-left,.tpl-button-right,.tpl-button-center{
align-items:center;
}
}


Line 64: Line 73:
.tpl-button:hover{ /*colors other than red, which we use for Citizen, are automatically recalculated on a filter value*/
.tpl-button:hover{ /*colors other than red, which we use for Citizen, are automatically recalculated on a filter value*/
filter:brightness(110%) saturate(100%);
filter:brightness(110%) saturate(100%);
}
.tpl-button-red a, .tpl-button-blue a{
color:#fff;
}
.tpl-button-green a,.tpl-button-yellow a{
color:#333;
}
}


Line 77: Line 78:
.tpl-button{
.tpl-button{
width:75%!important;
width:75%!important;
margin:auto;
}
}
.tpl-button-left,.tpl-button-center,.tpl-button-right{
.tpl-button-left,.tpl-button-center,.tpl-button-right{

Revision as of 21:41, 13 October 2024

/* Button.css */
.tpl-button {
    display: inline-block;
    position:relative;
    padding: 4px 10px;
    width:100%;
    height:40px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
	line-height:1;
	text-decoration:none;
}

.tpl-button p{
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.tpl-button-center > a, .tpl-button-left > a, .tpl-button-right > a{
	height:40px;
	width:100%;
}

.tpl-button-center > a,.tpl-button-left > a,.tpl-button-right > a{
	height:100%;
}

/* Choose where to align the button (left, right, center) */
.tpl-button-left{
	display: flex;
	justify-content: flex-start;
}

.tpl-button-center{
	display: flex;
	justify-content: center;
}

.tpl-button-right{
	display: flex;
	justify-content: flex-end;
}

/*available colors*/
.tpl-button-red {
    background-color:#b50014; /* taken from Citizen.css : --color-red-3*/
    color:#fff;
}

.tpl-button-red:hover{
	background-color:#c33242; /* --color-red-light-3 from Citizen.css */
}

.tpl-button-blue {
    background-color: #143fbf;
    color:#fff;
}

.tpl-button-green {
    background-color: #52CF44;
    color:#333;
}

.tpl-button-yellow {
    background-color: #FFDA1F;
    color:#333;
}

.tpl-button:hover{ /*colors other than red, which we use for Citizen, are automatically recalculated on a filter value*/
	filter:brightness(110%) saturate(100%);
}

@media screen and (max-width:768px){
	.tpl-button{
		width:75%!important;
	}
	.tpl-button-left,.tpl-button-center,.tpl-button-right{
		display: flex;
		justify-content: center;
	}

}