Page 2 of 2

Re: HTML5, Using more CSS

Posted: Tue Mar 28, 2017 5:54 am
by kaspir
I certainly did not want to change up your style. :) I love your work, idealism! I totally get what you mean with using tables. Frankly, I don't know why I worry about HTML5. But because of it, I got used to relying on CSS, still learning a lot of the animated tricks you can do with it is always fun.

Having said that, whenever I get bored, I may begin to add some CSS I find 'fancy' or whatever. When I do, I'll keep everyone in mind and name classes things like, ex: <div class="w3 lastpost avatar"><img ... would be in CSS .w3.lastpost.avatar img - Let me know how this looks to you, of course there we could even use id="w3" instead. It shouldn't be conflicting, and I suppose others can manage it well. I'll drop any of my changes, neatly in a PM the code, since I wouldn't want to publish something that's not yet integrated, which would allow you to make your changes, if any. I always love giving back, paying it forward when I can!

For now, all I've done with made this correction, by simply removing the table cellpadding and cellspacing in phpbb_last_topics.php.

Corrected them, and nothing out of place on that I notice.
Perhaps, some may required the extra html.


I'm not sure what you fully meant with this,
axew3 wrote: Sat Mar 25, 2017 3:03 pm Style element or id, or class, will become variables (which will be possible to setup into wp_w3all config page). It will be added into next coming 1.6.7, 1.6.8 at max.
Do you mean, users will be able to customize CSS, within an admin panel?

Re: HTML5, Using more CSS

Posted: Tue Mar 28, 2017 9:14 am
by axew3
hello!
Do you mean, users will be able to customize CSS, within an admin panel?
Yes, simple text input fields, where to put classes or id that will be applied to elements ul li into widget.
At same time, last topics html code that output widget (this will be done also for login widget) will be rewrite to be exactly as is, a default wp widget code. And to separate as more is possible, php server related code, from html code to display, making all very easy to custom as needed and get it perfectly inline with used theme template. In my fast old tests when 1 year ago +- i've choose to use table for avatars mode in last topics: reason was exactly the vertical align for the avatar. Will be necessary more css to apply a vertical align correct other elements (ul li). In a td, just vertical-align property.

So the best way would be maybe to wrap the table and his elements, into default li wp widget. This will return a correct layout on any theme.

we could even use id="w3" instead. It shouldn't be conflicting
in this case, it will be not more necessary due to the above. You'll give class or id, in accord with your theme, or setting nothing, the default style will be applied.

An example when all will be ready will be more clear, as i think with my bad English i'm going to confuse you what is really simple.

p.s about conflicting: it is commonly not good to choose namespaces very short like w3, or write a code with global scope vars or functions named like a or b. If another programmer use same named vars into code of a plugin, than a conflict could come out. There are numerous w3 prefixed plugins at wp.org repository, you can't be sure that one of these not use w3 as prefix for css id or vars or something else. It is better to choose something more specific. I've choose w3all or wp_w3all as prefix just to be more sure, because you never know how and by who your code will be used.

Re: HTML5, Using more CSS

Posted: Thu Jul 27, 2017 6:19 am
by kaspir
Demonstration of errors: https://validator.w3.org/nu/?doc=https% ... few.com%2F

If cellpadding = 0, why is it even required if we're still using tables?

EDIT: note, thats really only one line of code, and demo is showing an error for each one of my past 20 topic posts. So not 20 errors, just one in HTML5

Re: HTML5, Using more CSS

Posted: Thu Jul 27, 2017 8:45 am
by axew3
hi! ok look, this is the part on
views/phpbb_last_topics.php

Code: Select all

<table cellpadding=\"0\" cellspacing=\"0\"
remove

Code: Select all

cellpadding=\"0\" cellspacing=\"0\"
and use instead the css where, for the table and td element:

Code: Select all

style=\"vertical-align:middle;margin:0;border:0;\"
change into:

Code: Select all

style=\"border-spacing:0;border-collapse:collapse;vertical-align:middle;margin:0;border:0;\"
substantially, remove the

Code: Select all

cellpadding=\"0\" cellspacing=\"0\"
and add it into style attribute.

ok, will be fixed on this coming release ...

Re: HTML5, Using more CSS

Posted: Thu Aug 03, 2017 5:16 am
by kaspir
The fix is simple, don't hard code any of it. Move all to CSS, using your already established identifiers.

Re: HTML5, Using more CSS

Posted: Tue Aug 15, 2017 11:40 am
by MichaelH
kaspir wrote: Thu Aug 03, 2017 5:16 am The fix is simple, don't hard code any of it. Move all to CSS, using your already established identifiers.
That would work, thanks.