Hiding background of button when viewing PM

Go down

Solved Hiding background of button when viewing PM

Post by Rhino.Freak on April 26th 2016, 5:35 pm

Hey guys!
I have a very little issue.. So I've developed this theme (which hopefully will be out very soon) and there's a little problem which I can't fix.
Basically when you are reading a private message, there is this css code which I DON'T want to activate.
I have made this little Material Design button via css.
Here's how it looks right now when reading a PM

I want the button behind "POST REPLY" to be hidden.

Here's how it looks when viewing a forum or private message list.


Here's how it looks when viewing a topic


As you can see it works exactly how I want in all places EXCEPT when viewing PMs. I tried to fix it but it resulted in uglier problems so.. yeah.
Please help! Smile
Thanks in advanced!

#phpbb3 #design
Forum Url: http://freetest.forumotion.net/

Test account info available for those who reply.
avatar
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Ange Tuteur on April 26th 2016, 6:16 pm

@Rhino.Freak for the button selector set ( .buttons div.post-icon ), try adding
Code:
form[name="privmsg_list"]
to the beginning so you get :
Code:
form[name="privmsg_list"] .buttons div.post-icon {
  ...
}
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Rhino.Freak on April 26th 2016, 6:23 pm

Thanks for the quick reply @Ange Tuteur
I actually tried that before.
After adding that I can no longer see the button when viewing topic lists in viewforum.

I also tried to add that selector IN ADDITION to the existing setup while setting up another
Code:
form[action="privmsg?folder=inbox"]
selector and trying to desperately set nearly all values to 0 but things went ugly in the end and I had to scratch that Sad
avatar
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Ange Tuteur on April 26th 2016, 6:30 pm

Oh you're right, I didn't think about that. How would selecting the anchor work for you ? Like this :
Code:
.buttons div.post-icon a:not([href^="/privmsg?mode=reply"])
That way you can use :not() to filter out links by their href attribute.
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Rhino.Freak on April 26th 2016, 6:37 pm

Aaaand you've done it again Very Happy Thank you!
I didn't even knew about the existence of that
Code:
:not()
thing! Thanks a lot once again!
avatar
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Ange Tuteur on April 26th 2016, 6:53 pm

Anytime ! Doff

CSS has it's little secrets.. like variables.. Shifty Can't wait til those are standardized.

BTW if you want to exclude multiple elements you have to write :not() again, like this :
Code:
.buttons div.post-icon a:not([href^="/privmsg?mode=reply"]):not(Rhino.Freak)
I don't know who thought that would be a good idea, but that's how it works. A comma would've been better IMO. lol!
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by Rhino.Freak on April 26th 2016, 6:59 pm

Nice! That's basically one of the features of SASS and such! Good to hear it being supported natively!
avatar
Rhino.Freak
Helper
Helper

Male Posts : 1248
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Hiding background of button when viewing PM

Post by SLGray on April 26th 2016, 9:02 pm

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43491
Reputation : 3094
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum