XF 2.1 Change the radius of a button after removing the button next to it

gogo

Well-known member
1589869552484.png

So after I've hidden the 'Mark read' button by making it as 'display:none;' how do I make the Unwatch/Watch button round cornered?

I've tried:

Code:
.button--link[href*="watch"]  {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

Nothing happened.
 
No. I want to hide Mark read, i.e.

Code:
.button--link[href*="mark-read"]  {
  display: none;
}

This is done. Mark read is gone.

And then I want to make the corners of Watch/Unwatch button round.

The following code doesn't work.

Code:
.button--link[href*="watch"] .button-text {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}

nor

Code:
.button--link[href*="watch"] {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}
 
Last edited:
1589873135511.png
Less:
.buttonGroup
{
    > .button
    {
        &.button--link[href*="watch"] {
            &:last-child:not(:first-child)
            {
                border-top-left-radius: 4px;
                border-bottom-left-radius: 4px;
            }
        }
    }
}
or you can use this and xf function.
Less:
.buttonGroup
{
    > .button
    {
        &.button--link[href*="watch"] {
            &:last-child:not(:first-child)
            {
                .m-borderLeftRadius(4px);
            }
        }
    }
}
 
Got it done by making a little change to your code.

Code:
.buttonGroup
{
    > .button
    {
        &.button--link[href*="watch"] {
            &:not(:last-child):not(:first-child)
            {
                .m-borderLeftRadius(4px);
            }
        }
    }
}

Thanks a lot!
 
In order not to do such checks, there is a pseudo-class :nth-child
 
Top Bottom