Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2023-12-11 14:55:23

etc
Developer
Registered: 2010-11-11
Posts: 5,210
Website GitHub

Re: Is href="#" still necessary?

His choice now :-) At least, I hope the preview widget will be used more often. It’s my worst time/utility ratio atm.

Offline

#14 2023-12-11 17:59:32

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Is href="#" still necessary?

Hi all, I have just added a way of de-styling <button> tags so they look like plain links, as suggested.

Please use:

<button class="txp-reduced-ui">Button Text Here</button>

Offline

#15 2023-12-11 18:10:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

Re: Is href="#" still necessary?

Nice!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#16 2023-12-11 19:17:06

etc
Developer
Registered: 2010-11-11
Posts: 5,210
Website GitHub

Re: Is href="#" still necessary?

That works, thanks Phil. But also makes me think that we could put these common rules in some core textpattern.css rather than duplicating them in each theme. There is a number of class names (like not-ready or hidden) that are part of txp internal workflow.

Offline

#17 2023-12-11 22:16:03

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,207
Website

Re: Is href="#" still necessary?

But also makes me think that we could put these common rules in some core textpattern.css rather than duplicating them in each theme

Why ?

That would limit what an admin-theme author can or want to do.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#18 2023-12-11 22:24:08

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,207
Website

Re: Is href="#" still necessary?

Me

<button class=“txp-reduced-ui-button”>close</a> (name TBD, […]

Phil

<button class=“txp-reduced-ui”>Button Text Here</button>

Ha!

–^–

Slight objection to that class name it is already used on the login panel on the parent element for that language <select /> at the top. On the Write panel, a slightly different class – no-ui-button is used that does the same too (and again applied to the parent element


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#19 2023-12-11 22:34:02

etc
Developer
Registered: 2010-11-11
Posts: 5,210
Website GitHub

Re: Is href="#" still necessary?

I have not found txp-reduced-ui-button in css, sorry if I have missed something.

phiw13 wrote #336114:

Why ?

That would limit what an admin-theme author can or want to do.

How? Rules are overridable, and I’m not asking for a complete set of rules. It’s just pity to include, say, .not-ready or .hidden in each theme, given they (should) always act the same.

Offline

#20 2023-12-12 05:19:58

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,207
Website

Re: Is href="#" still necessary?

I have not found txp-reduced-ui-button in css, sorry if I have missed something.

It was a naming suggestion (hence the name TBD)… :-) – knowing full well there was no button class that could be used.

How? Rules are overridable, and I’m not asking for a complete set of rules. It’s just pity to include, say, .not-ready or .hidden in each theme, given they (should) always act the same.

OK, you can certainly have .busy, .not-ready and maybe .hidden for your shared stylesheet. And maybe another thing: the whole set of icons, worth about 50000 characters or ~50KB. I don’t think there is much more that can be worth sharing. Wrap all that in a minified core.css.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#21 2023-12-12 09:34:44

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Is href="#" still necessary?

Righto, I have changed the class name to now be .txp-reduced-ui-button as suggested by Philippe.

Offline

#22 2023-12-12 09:50:49

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,207
Website

Re: Is href="#" still necessary?

Righto, I have changed the class name to now be .txp-reduced-ui-button as suggested by Philippe.

Thank you. Some possible clashes avoided!

–^–

The renewed preview button (now a <button />) is nice improvement, part. for keyboard users. Tabtabtab (or shift+tab…) to access the button, then press the space-bar and the action happens.

(There are a few other button-links that would benefit from this)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#23 2023-12-12 11:05:23

etc
Developer
Registered: 2010-11-11
Posts: 5,210
Website GitHub

Re: Is href="#" still necessary?

phiw13 wrote #336117:

OK, you can certainly have .busy, .not-ready and maybe .hidden for your shared stylesheet. And maybe another thing: the whole set of icons, worth about 50000 characters or ~50KB. I don’t think there is much more that can be worth sharing. Wrap all that in a minified core.css.

Oh, that’s a nice thing, the distrib size would benefit from it! May I suggest that you or Phil consider this possibility? But I doubt it’s the only intersection between 4-5 existing admin themes. Every time we adopt some ‘global’ change, like anchor-looking-button, it needs to be duplicated.

(There are a few other button-links that would benefit from this)

I’ve tried to transform Text/HTML preview switchers into buttons, but this breaks their style, so we need to bother Phil again. See above…

Offline

#24 2023-12-12 11:34:40

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,207
Website

Re: Is href="#" still necessary?

Every time we adopt some ‘global’ change, like anchor-looking-button, it needs to be duplicated.

As a theme author, it is nearly always much easier and faster to add this or that element from scratch. In the case of today’s txp-reduced-ui-button button, over 90% of the work was already done. It took a little more time for the .caution button as the relevant colours were never intended for use on button and some tweaking was needed. Nobody would have died looking at that button in its more default styling.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB