phloo
SecurityDog
tretoko
henryonsoftware
I've made a few styles for my site to have reactions always be shown without needing to hover. Screenshots for the 5 styles below, all are showing the default view of a post without hovering, most have two screenshots showing different states depending if the user has reacted already or not.
Note that style 1 and 2 (left aligned reactions) are only compatible with gamification extension (as I use), and not default likes extension. I also did not do one for mobile as I do not use my site on mobile but I think it's always visible there anyway. If anyone makes any improvements please share with me so I can use too 🙂
Style 1: Show all actions, left aligned react
@media (min-width: 768px){
.no-touch .CommentPost aside.Post-actions {
opacity: 1;
}
.Post-actions .item-react {
position: absolute;
float: left;
left: 0;
top: 3px;
}
.Reactions .Reactions--reactions .Button-emoji-parent{
background-color: #ffffff;
-webkit-box-shadow: unset;
box-shadow: unset;
border-radius: 3rem;
padding: 6px 5px;
transition: all .2s ease-in-out
}
.Reactions .Reactions--reactions .Button-emoji-parent:hover{
webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}
.Reactions .Button-label {
margin-left: 0px !important;
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
aside.Post-actions>ul{
display: inline-flex;
align-items: center;
}
.item-votes .CommentPost-votes .Post-vote {
background-color: rgba(0,0,0,0);
border: none;
margin: 0px;
}
.Reactions button{
margin-right: 5px;
}
.Reactions .Reactions--react {
display: inline-block;
vertical-align: text-bottom;
}
.Reactions--react{
margin-right: 4px;
}
}
Style 2: Show only react, left aligned react (show rest on hover)
@media (min-width: 768px){
.no-touch .CommentPost aside.Post-actions {
opacity: 1;
}
.Post-actions .item-react {
position: absolute;
float: left;
left: 0;
top: 3px;
}
.Reactions .Reactions--reactions .Button-emoji-parent{
background-color: #ffffff;
-webkit-box-shadow: unset;
box-shadow: unset;
border-radius: 3rem;
padding: 6px 5px;
transition: all .2s ease-in-out
}
.Reactions .Reactions--reactions .Button-emoji-parent:hover{
webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}
.Reactions .Button-label {
margin-left: 0px !important;
}
.no-touch .CommentPost .Post-actions ul>li:not(.item-react) {
opacity: 0;
transition: all .1s ease-in-out;
}
.no-touch .CommentPost :hover .Post-actions ul>li {
opacity: 1;
transition: all .1s ease-in-out;
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
aside.Post-actions>ul{
display: inline-flex;
align-items: center;
}
.item-votes .CommentPost-votes .Post-vote {
background-color: rgba(0,0,0,0);
border: none;
margin: 0px;
}
.Reactions button{
margin-right: 5px;
}
.Reactions .Reactions--react {
display: inline-block;
vertical-align: text-bottom;
}
.Reactions--react{
margin-right: 4px;
}
}
Style 3: Show all actions
@media (min-width: 768px){
.no-touch .CommentPost aside.Post-actions {
opacity: 1;
}
.Reactions .Reactions--reactions .Button-emoji-parent{
background-color: #ffffff;
-webkit-box-shadow: unset;
box-shadow: unset;
border-radius: 3rem;
padding: 6px 5px;
transition: all .2s ease-in-out
}
.Reactions .Reactions--reactions .Button-emoji-parent:hover{
webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}
.Reactions .Button-label {
margin-left: 0px !important;
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
aside.Post-actions>ul{
display: inline-flex;
align-items: center;
}
.item-votes .CommentPost-votes .Post-vote {
background-color: rgba(0,0,0,0);
border: none;
margin: 0px;
}
.Reactions button{
margin-left: 5px;
margin-right: 5px;
}
.Reactions .Reactions--react {
display: inline-block;
vertical-align: text-bottom;
}
.Reactions--react{
margin-right: 4px;
}
}
Style 4: Show only react (show rest on hover)
@media (min-width: 768px){
.no-touch .CommentPost aside.Post-actions {
opacity: 1;
}
.Reactions .Reactions--reactions .Button-emoji-parent{
background-color: #ffffff;
-webkit-box-shadow: unset;
box-shadow: unset;
border-radius: 3rem;
padding: 6px 5px;
transition: all .2s ease-in-out
}
.Reactions .Reactions--reactions .Button-emoji-parent:hover{
webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}
.Reactions .Button-label {
margin-left: 0px !important;
}
.no-touch .CommentPost .Post-actions ul>li:not(.item-react) {
opacity: 0;
transition: all .1s ease-in-out;
}
.no-touch .CommentPost :hover .Post-actions ul>li {
opacity: 1;
transition: all .1s ease-in-out;
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
aside.Post-actions>ul{
display: inline-flex;
align-items: center;
}
.item-votes .CommentPost-votes .Post-vote {
background-color: rgba(0,0,0,0);
border: none;
margin: 0px;
}
.Reactions button{
margin-left: 5px;
margin-right: 5px;
}
.Reactions .Reactions--react {
display: inline-block;
vertical-align: text-bottom;
}
.Reactions--react{
margin-right: 4px;
}
}
Style 5: Show emoji/reply/dropdown (gamification votes on hover)
@media (min-width: 768px){
.no-touch .CommentPost aside.Post-actions {
opacity: 1;
}
.Reactions .Reactions--reactions .Button-emoji-parent{
background-color: #ffffff;
-webkit-box-shadow: unset;
box-shadow: unset;
border-radius: 3rem;
padding: 6px 5px;
transition: all .2s ease-in-out
}
.Reactions .Reactions--reactions .Button-emoji-parent:hover{
webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
.Reactions .Button-label {
margin-left: 0px !important;
}
.no-touch .CommentPost .Post-actions ul>li:not(.item-react):not(.item-like):not(.item-reply)[class] {
opacity: 0;
transition: all .1s ease-in-out
}
.no-touch .CommentPost :hover .Post-actions ul>li:not(.item-react):not(.item-like):not(.item-reply)[class] {
opacity: 1;
transition: all .1s ease-in-out
}
.item-votes .CommentPost-votes .Post-vote {
background-color: rgba(0,0,0,0);
border: none;
margin: 0px;
}
.Reactions{
line-height: 1;
margin-right: 0px !important;
}
aside.Post-actions>ul{
display: inline-flex;
align-items: center;
}
.Reactions button{
margin-left: 5px;
margin-right: 5px;
}
.Reactions .Reactions--ShowReactions {
margin-right: 7px;
}
.Reactions .Reactions--react {
display: inline-block;
vertical-align: text-bottom;
}
.Reactions--react{
margin-right: 4px;
}
}