Wedge

Public area => The Pub => Topic started by: Nao on August 31st, 2012, 11:13 AM

Title: Getting ready for an alpha release: CSS fixes
Post by: Nao on August 31st, 2012, 11:13 AM
Been busy IRL blah blah blah, worked on a few things that I wanted to fix in my CSS. Not happy with the things I've had to give up for that... So I want your opinion, because all of this has been accumulating over the last couple of days, and last time I checked, I really wanted to commit everything I have before I'm ready for an alpha.

1/

Gradients in headers (Wine and children): for a long time, what I used was a very small PNG image, which allowed it to work in IE6+. Recently, I decided to replace gradient images with proper gradients, as IE6 doesn't deserve any non-essential goodies anyway. So I did that.
Then I realized that an issue with linear-gradient, is that to get the same effect as an image, you have to specify color stops in pixels, and then set an explicit background-size... It's a bit complicated, but I did it. (Unfortunately, it also meant that the resulting CSS was probably on par with the earlier one in terms of size :P)
Okay, so this morning, I was thinking... "What the hell?! I could simply be using an inset box-shadow to act as the inner gradient! And I get to set my pixel dimensions!"
And it works fantastic. Really. It's just a single line of code. It works in IE9+, and it's cleaner.
However... There's a catch.
The performance is excruciatingly slow when there are lots of these, e.g. alternating backgrounds in the error log or display page. Really. Under Opera 12.5, it runs fine, just a bit less responsive, but when you show a confirm box, you can see how long it takes to show up... Under Firefox 16, it's like night and day. Super fast with a gradient, HORRIBLY slow with a box-shadow.

That's really, really annoying because the results are much better in box-shadow mode!
So... What do you reckon I should do? Is there a way to fix performance? I'm talking about a test done on a Core i7 computer... :-/

2/

Another thing that always bothered me... Wedge using JavaScript to reposition the sidebar, instead of media queries. This was originally because I would 'switch' positions between two different elements, so that I could set a specific target for the sidebar inside the DOM, instead of using CSS tricks to reposition it. As time went by, I decided to save bandwidth in all HTML pages by applying a 'responsive' ID to the DOM's top instead, and I hacked into the CSS in a relatively clean way that I was satisfied with. Okay, so far so good...
Now, this morning I was looking at my code, and the first thing that came to mind was, "WTF?! I use #responsive to set specific media queries... Why not just use @media $responsive?". And this is exactly what I did...
So, $responsive is set to a max-width of 1000px for now, it's working okay. The main benefit here is that because it's done on the CSS level, there's absolutely zero FOUC effect when reloading a page. (There used to be a very, very short one when doing a F5 refresh.)
Plus, I think themers will be comfortable with that... As long as they know about responsive design, of course.

Now for the drawbacks...

- @media doesn't have a set precedence factor, so it doesn't change priorities in the code, unlike #responsive. This means that if you set a #responsive #sidebar to 'display: block' in index.css (or even in an hypothetical extra.css file in Weaving), and then set #sidebar to 'display: table' in a sub-skin's extra.css file, the resulting responsive page will have #sidebar set to display:block because #responsive has higher priority. But if you start replacing all of these with @media $responsive, the resulting responsive page has #sidebar set to display:table because it was filled in after the original media query. The (clean!) solution I'm using, is to take the original media query, copy it at the end of my extra.css file, and add a reset suffix to it. Yes, "@media $responsive reset" is all that's needed. This way, the original media query is removed, and the new one is set at the one, and it includes the original media query's rewrites. Yes, it isn't as bulletproof as direct inheritance because if Weaving is heavily modified you'll have to modify your sub-skin as well. But it's probably something that could also happen with #responsive, albeit with different issues.

- Perhaps an even worse one... Unfortunately, @media being a special construct, you can have a selector like ".myclass, #myid, @media all .anotherclass", ah ah. Well, Wedge doesn't even bother checking... It actually does build such a selector if you add an 'extends' keywords to .anotherclass in the media query. Which pretty much makes the css declaration fail. So, yes, it does mean that whenever you start declaring a media query, *you can't use any extends in it.* Bummer!

So, I'm seriously considering going back to the 'original', as flawed as it is.

3/

And finally... The menu arrows.
Currently, they're using a lightweight (150-byte) image with horizontal and vertical positions, as well as a hover version.
I decided that I wanted to associate the arrows with the text next to them -- so that you can set the text to any color and they'll follow the color. So I replaced the arrows with CSS right-floated 'content' set to '\a0\25bc' (IIRC), in a pseudo-class of course. It seems to work really fine. This also allowed me to remove a couple of CSS hacks I had for the arrows. Unfortunately, this technique also has its limitations... Apart from the fact that pseudo classes don't work in IE6 (fuck you IE), there's the fact that Firefox shows arrows using a largely different size compared to Opera (?!), and float issues in the different places where it's all used, e.g. menu arrows aren't floated the same way when they're in the top-level menu or inside the menu itself. Same with linktrees...

This one is more of a technical issue to me, as philosophically I think I'm really good with using CSS content rather than images.
Anyone got any experience with that...?
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on August 31st, 2012, 05:29 PM
Re: 1, I tested under all 5 main browsers, and only Firefox has big issues with box-shadows everywhere... Others work okay. With the fastest being Opera and... IE9, oddly!
Still, dunno if I'm going to do that for windowbg/postbg. It's probably best to keep my inset box shadows to places that don't repeat indefinitely on a page.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on August 31st, 2012, 11:18 PM
Was my post too long? Did anyone read it? Or have an opinion on any of these points..?
I'm just saying -- I myself find I don't have enough time to participate in all topics (I'm planning to play catch-up later, for now I'm just resorting to reading new posts via the Recent Posts feature), maybe I'm not alone...
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: godboko71 on August 31st, 2012, 11:21 PM
Quote from Nao on August 31st, 2012, 11:18 PM
Was my post too long? Did anyone read it? Or have an opinion on any of these points..?
I'm just saying -- I myself find I don't have enough time to participate in all topics (I'm planning to play catch-up later, for now I'm just resorting to reading new posts via the Recent Posts feature), maybe I'm not alone...
Been stuck on site all day so not had a chance to read and reply. I apologize.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Jntg4 on August 31st, 2012, 11:22 PM
It was lengthy, but glad to see a lot of progress towards an alpha!
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on August 31st, 2012, 11:28 PM
I read it, I just don't really understand what the consequences of these things are in practice.

What I can say is that:
1. No matter how pretty it is, if it's visibly sluggish on an i7 box, let it go.

2. How much of a *practical issue* is the inability to use extends on a media query? What would you actually want to do that it would prevent you from doing?

3. I'm not sure it's worth the effort. The only thing that strikes me as relevant is the fact that some people like the style of linktree like XenForo uses, where you have a container and capsules with > ends that are highlighted on hover. Can this be done in the current setup just in CSS? Would it require a change in markup? Would the changes in markup that might be required also make this possible?


(also: I got the new replies warning)
Quote from Jntg4 on August 31st, 2012, 11:22 PM
It was lengthy, but glad to see a lot of progress towards an alpha!
Yes, 2 years is a lot of progress towards an alpha.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 1st, 2012, 12:09 AM
Quote from Arantor on August 31st, 2012, 11:28 PM
What I can say is that:
1. No matter how pretty it is, if it's visibly sluggish on an i7 box, let it go.
Been doing lots of tests, and really it's only sluggish on Firefox... Dunno what they got wrong when implementing box shadows.
Box shadow gradients are visibly *better looking* than linear gradients, so it's really tempting to stick to them. (Plus, IE9 supports box-shadow insets, while it ignores linear gradients.)
I could simply add a hack to extra.firefox.css to reset the box-shadow and use gradients instead just for that browser...
Quote
2. How much of a *practical issue* is the inability to use extends on a media query? What would you actually want to do that it would prevent you from doing?
Well, just as I mentioned... I tried doing an extends .inline-block on an element inside the media query, but it wasn't correctly compiled.
So I had to stick to using 'display: inline-block' on it. It's all fine on IE because inline-block was supported before media queries were implemented at all, but I'm attaching respond.js for these, which adds support for MQs, uh...
Anyway, it was just an example. I guess that in a common situation, you wouldn't need to extend MQ stuff because you'd want to try and keep it simple.

What's your favorite solution? (1) JS to finely tune the positioning of the sidebar (swapping it with another div, original implementation), (2) JS to add a #responsive class (selector order is easy), (3) JS-free classic media queries (have to be careful with selector order).
Quote
3. I'm not sure it's worth the effort. The only thing that strikes me as relevant is the fact that some people like the style of linktree like XenForo uses, where you have a container and capsules with > ends that are highlighted on hover. Can this be done in the current setup just in CSS? Would it require a change in markup? Would the changes in markup that might be required also make this possible?
I don't think you'd need to change the markup at all... Basically, it'd work whatever the current CSS is. You just need to 'cancel' it and replace it with your own. (These days, most kinds of shapes can be achieved with multiple box shadows or linear gradients, so that would be very much doable...)
Quote
Yes, 2 years is a lot of progress towards an alpha.
...You're not helping, you dirty b'stard :P
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Jntg4 on September 1st, 2012, 05:35 AM
Quote from Arantor on August 31st, 2012, 11:28 PM
I read it, I just don't really understand what the consequences of these things are in practice.

What I can say is that:
1. No matter how pretty it is, if it's visibly sluggish on an i7 box, let it go.

2. How much of a *practical issue* is the inability to use extends on a media query? What would you actually want to do that it would prevent you from doing?

3. I'm not sure it's worth the effort. The only thing that strikes me as relevant is the fact that some people like the style of linktree like XenForo uses, where you have a container and capsules with > ends that are highlighted on hover. Can this be done in the current setup just in CSS? Would it require a change in markup? Would the changes in markup that might be required also make this possible?


(also: I got the new replies warning)
Quote from Jntg4 on August 31st, 2012, 11:22 PM
It was lengthy, but glad to see a lot of progress towards an alpha!
Yes, 2 years is a lot of progress towards an alpha.
Ya, I probably should have said something about the imminence instead.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 1st, 2012, 08:13 PM
Okay, bump...

I'll try to use clear English for my questions (for everyone.)

1/ What kind of sidebar do you want to have when you reduce the width of your window?

a- The same sidebar... Fuck small windows, fuck mobile! Don't touch it ah ah ah. (This has no impact on anything else, obviously.)

b- Move it below the content, and if possible above the footer. (Uses @media -- this has an impact on how you can write media queries. You simply can't use inheritance or odd little things in media queries -- has to be mostly 'clean' CSS code.)

c- Move it below the content, and if possible above the footer, using JavaScript. (Uses #responsive ID insertion -- this has an impact on performance, i.e. when you load the page in a small window, you might see the un-modified sidebar show up for a few milliseconds before it goes to the footer.)

d- Move it just above the footer, whatever the internal CSS or HTML layout. (Uses DOM manipulation with JavaScript -- this is the cleanest solution, but has the same 'sidebar flash' as solution (c), and uses a few more bytes of JavaScript code at the end of your HTML.)

2/ Do you prefer the idea of having menu arrows (and linktree arrows etc) as HTML content, or as background images? (Both have their pros and cons. It's mostly a philosophical question, like do you believe John Carmack exists?)
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Drunken Clam on September 1st, 2012, 08:32 PM
I never, reduce the width of my window, so, 'a' for me.  Fuck small windows, fuck mobile! :whistle:
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Dragooon on September 1st, 2012, 11:05 PM
b for me, as CSS queries are the most elegant IMO. And HTML for the arrows.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on September 1st, 2012, 11:18 PM
b and HTML for me.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Dr. Deejay on September 2nd, 2012, 12:17 AM
B and HTML for me too. :)
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: godboko71 on September 2nd, 2012, 02:18 AM
B and HTML.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: nolsilang on September 2nd, 2012, 02:49 AM
B and HTML :)
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Pandos on September 2nd, 2012, 09:37 AM
Also b and HTML
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Powerbob on September 2nd, 2012, 01:25 PM
Quote from Drunken Clam on September 1st, 2012, 08:32 PM
I never, reduce the width of my window, so, 'a' for me.  Fuck small windows, fuck mobile! :whistle:
+1 :cool:
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: markham on September 2nd, 2012, 06:49 PM
Yup b and HTML seems to be the best choices.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 3rd, 2012, 07:51 AM
(Back from a BBQ party that lasted all day at my place... 30 people there, what a mess >_< My girlfriend definitely has a lot of cousins I never heard from until now.) (Some of them quite on the cute side, mwahah.) (Don't mind me.)

b isn't much of a problem. After all, thinking about it, a theme's quality is determined by the viewer, not by its author. It's up to the author to ensure it works best for users. Having media queries make their life more complicated, is trumped by the fact that users won't get that dreaded FOUC.

HTML arrows are more of a problem. Indeed, IE9 and Firefox don't play well with horizontal arrows in menu items. I had to make a specific rule for them, and even then IE9 will show the arrows under the text (if the text is the longest in the menu item list, otherwise it works as expected).
Also, there are a few complications that I'll have to deal with. One of these is caused by a limitation in the "&" keyword.

This is a simplified version of the horizontal arrow code, taken from common.css, with only the code that interests me right now:

Code: [Select]
.horizontal_arrow virtual
:after
opacity: .25
&:hover:after
opacity: .5

But nested menu items are a problem, because :hover doesn't apply on parent items. For that reason, I implemented long ago a .hove class on the parent <li>, so that I can target .hove & (instead of &:hover), and be done with. Here's where it gets funny... The selector that inherits .horizontal_arrow is called "li.subsection > a". Which is fine in regular times... However, doing ".hove li.subsection" doesn't work because it really is "li.subsection.hove" I should be targeting. But then, how do I represent that in WeCSS code...? Doing ".hove &" won't do, but "&.hove" won't do either, because it's developed to "li.subsection > a.hove"... And, anyway, it's never a good idea to add a 'specific' class like .hove to a 'generic' virtual like .horizontal_arrow!

(x) So, one way of doing it could be to 'simply' apply the hove class to both the li parent and its anchor child. I like the idea, but it means a few more bytes in the JS code, and it contradicts what I just said about what a good idea is...

(y) An alternative would be to only care about &:hover, as above (or even not at all?), and instead have an extra rule in index.css do the opacity change (i.e. clearly add a "li.hove > a" selector in plain view).

(z) Finally, another alternative is (very similarly to (y)) to simply remove that specific horizontal rule from the common definitions list, because it's really only used in the menu items, so I could just have the code above inserted into index.css. (There is also another horizontal_arrow class for inline elements.)

All in all, the CSS for HTML arrows is a bit weightier than the background-image version, because the image is only 150 bytes and when gzipped, its base64-encoded version is around that size. Of course, it's likely that the gzipped version of the CSS code above is smaller than 150 bytes, I'm not exactly sure. But still, it's funny that by trying to remove a few background-image hacks that were in the original arrow code, I ended up finding new issues with various browsers... (Even when taking IE6 and IE7 aside, as they never supported the background-image version really well anyway.)

What do you think, guys...?
Posted: September 3rd, 2012, 12:44 AM

:edit: Edited this post to add clear separations between multiple choices.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 4th, 2012, 09:16 AM
So... No opinions from anyone? Even those who suggested going for HTML arrows? :whistle:
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: godboko71 on September 4th, 2012, 05:08 PM
If HTML is a no go do what feels best to you. This is clearly something that can change after alpha is you or someone else comes up with a better way.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on September 4th, 2012, 07:14 PM
I think a lot of it is that I don't really think we can fully understand the consequences for the changes, that's one of the problems. I have no idea of what the consequences will be for any of the choices.

(Edit: I got the new reply warning)
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: spoogs on September 4th, 2012, 09:37 PM
I don't really have a take on this, mainly because I'd probably not be using it reduced. If I had a preference I think I'd rather the sidebar be hidden. Having to choose from the options above I'd go with b since thats where everyone else seems to be :P
Quote from Arantor on September 4th, 2012, 07:14 PM
I think a lot of it is that I don't really think we can fully understand the consequences for the changes, that's one of the problems. I have no idea of what the consequences will be for any of the choices.
^^^This is me for sure ^^^
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on September 4th, 2012, 10:17 PM
And without wishing to be arrogant or modest, or whatever perspective you might want to draw from it, if *I* don't understand the consequences of these, I doubt anyone else will either... That's one of the downsides to something this complicated.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Oracle on September 4th, 2012, 10:28 PM
Quote from spoogs on September 4th, 2012, 09:37 PM
I don't really have a take on this, mainly because I'd probably not be using it reduced. If I had a preference I think I'd rather the sidebar be hidden. Having to choose from the options above I'd go with b since thats where everyone else seems to be :P
Quote from Arantor on September 4th, 2012, 07:14 PM
I think a lot of it is that I don't really think we can fully understand the consequences for the changes, that's one of the problems. I have no idea of what the consequences will be for any of the choices.
^^^This is me for sure ^^^
Your not alone Spoogs!
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Norodo on September 5th, 2012, 02:17 AM
Quote from Nao on September 3rd, 2012, 07:51 AM
What do you think, guys...?
I say go for x, but make a comment in the CSS so that people will know that JS witchcraft is being performed. Seems to me to be the least horrific way to go about things. If people have JS disabled it won't change too much, and if they have it enabled it won't be the end of the world.

CSS is so neat at most times, but can be oh so stupid for some things.

EDIT: http://www.w3.org/TR/selectors4/#subject <-- In five years we will all be telling new CSS users how lucky they are to have all the neat tools they currently have, and they will still whine that CSS is insufficient. It will be grand times
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 5th, 2012, 05:30 PM
Quote from Norodo on September 5th, 2012, 02:17 AM
I say go for x, but make a comment in the CSS so that people will know that JS witchcraft is being performed. Seems to me to be the least horrific way to go about things. If people have JS disabled it won't change too much, and if they have it enabled it won't be the end of the world.
I dunno, I've been thinking about it and I'll probably go for the specific hack -- if only because I really don't want people to think it's something they should use in their own skins, ah ah.
Quote
CSS is so neat at most times, but can be oh so stupid for some things.
Tell me about it.
I think overall, WeCSS took me over 6 months to develop (1 month for the main code, 5+ months for bug fixes and improvements.) Had I known earlier, I probably would...have done it again. It's just that it isn't Wedge. It's just a cool part of it... But it's also the most invisible part to most people: with today's bandwidths, you don't really see a difference at load time (most of my time savers aren't related to WeCSS).
Quote
EDIT: http://www.w3.org/TR/selectors4/#subject <-- In five years we will all be telling new CSS users how lucky they are to have all the neat tools they currently have, and they will still whine that CSS is insufficient. It will be grand times
Don't see what you're pointing to...

The only 'important' thing I feel that CSS is missing (and that is hardly targetable in WeCSS either), is "selector < subselector", i.e. "target any selector that has the specific subselector". That one would be so dead cool... And I don't care about performance issues, eh!
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Norodo on September 5th, 2012, 05:51 PM
Quote from Nao on September 5th, 2012, 05:30 PM
The only 'important' thing I feel that CSS is missing (and that is hardly targetable in WeCSS either), is "selector < subselector", i.e. "target any selector that has the specific subselector". That one would be so dead cool... And I don't care about performance issues, eh!
Check out the table at the beginning of the draft. TL;DR you will be able to do parent selection by doing E! > F.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 5th, 2012, 07:22 PM
lol, the link didn't work on my iPod actually... It works in Opera. And I'm stunned, you linked precisely to a proposed fix for the issue I mentioned! I promise I didn't read that page :lol:
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Norodo on September 5th, 2012, 08:48 PM
I'm pretty sure there's some kind of fix in jquery too.

Found it: https://github.com/Idered/cssParentSelector
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 5th, 2012, 11:58 PM
Thankfully, I don't need anything, but even if -- I try not to rely on JS to support CSS if I can do without it.
Heck, CSS = presentation only, if it isn't supported, it'll just be ugly...
Cf. rev 1683.

Oh, and regarding arrow sizes -- actually this isn't due to the font size, but rather the fact that some browsers don't render certain UTF characters at the same size. Very odd. One solution is to change the arrow to use a different one -- it works, but it's too large, so I'd then have to set a font-size: 60% or something in the code. Which I didn't like much. I decided not to give a damn for now :P I've already spent way too much time on that particular rewrite...

PS: I'd like to fix Wine & co before I upload the changes to wedge.org.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 7th, 2012, 07:31 AM
Aaaaand... Skin updates are online I figured I'll fix Wine later :P). There are plenty of changes (menu arrows, fixed sub-skins...), hope you'll like them! The only issue I met is that menus are about 10% slower to show in Opera 12.5, but it's the only browser that's showing even a slowdown, so it's okay, it's not like I'm spending my days in there anyway...

Looking for feedback on 1024x768/1024x600 screens too... What do you think? They should have the sidebar now, unlike previous versions... Should I remove the sidebar for these widths?
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: godboko71 on September 7th, 2012, 08:06 AM
Skins looking good on iPad 2, will have to check them on pc in morning. Great job.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: nolsilang on September 7th, 2012, 08:26 AM
Looks good, but if you must move the sidebar again please put it above :) [1]
 1. Just personal preference
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 8th, 2012, 01:38 AM
I don't see the point in moving it to the top, and forcing people to systematically scroll...
Plus, it's one thing to be able to move the sidebar to the bottom with a CSS trick. It's a different thing to do it the other way around, because it supposes you add the HTML for the sidebar BEFORE the HTML for the content. And guess what -- not great for SEO.

Ah, yes, I've been working on a table-less version of the sidebar for IE6/7, because I figured, it's nice to show off what WeCSS can do (on-the-fly table/table-free layouts), but it's best to keep the stuff simple and stupid, especially in a default skin.

Also, I've been working on a new feature for WeCSS which I can't believe I never had.... Conditional compilation of CSS depending on the browser. It was already done for variables inside a file, but never for arbitrary properties/rules/entire blocks. Duh. This can potentially remove many of the hack files I added to the skin folders -- and most importantly, it makes the hacks easier to maintain because they can be put right next to the non-hack versions.

Now if I could settle on a proper syntax for that... I'm not too fond of {if ie6,ie7}...{else}...{endif}.
I'll sleep on it.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: emanuele on September 13th, 2012, 09:50 AM
/mefinds sidebars useless...but that's not the point of the topic... :P (even though...a collapse button somewhere? :angel: )
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 13th, 2012, 05:24 PM
A few reasons why 'mandatory' sidebars have a point in Wedge... Feel free to disagree.

- If you know the sidebar is going to be there (even if moved to the end of the page), it's a 'sure' target for any block you'd want to add that doesn't belong in the main content.

- Readability of main text content. Because long lines make it harder to 'catch' the next line when reading, it's always recommended to do no more than 50-100 characters per line, I took the upper one and limited my widths to about 600 to 800 pixels in width on all my designs. Because today's displays can have largely varying widths (up from 2000px+ on Retina screens down to 320- on mobile phones), it's best to hide the sidebar on smaller displays, and have it in wider displays to give some additional content that would help eliminate the feeling that you're reading a single column of a regular paper if you're on a 600px wide column in a 2000px wide window... See what I mean.

- Most forums have a very complicated layout for topic pages, with much useless information. I did my best to push all that 'useless' stuff to the sidebar -- because removing it wasn't a solution either. It makes topics more user-friendly overall. And more work can be done on that...
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: emanuele on September 14th, 2012, 06:02 PM
Quote from Nao on September 13th, 2012, 05:24 PM
- Most forums have a very complicated layout for topic pages, with much useless information. I did my best to push all that 'useless' stuff to the sidebar -- because removing it wasn't a solution either. It makes topics more user-friendly overall. And more work can be done on that...
That is exactly the reason I suggested a toggle: I already know that most of the things that are (and could be) in the sidebar on *any* forum are *for me* useless (dunno, most likely I have a rather peculiar way to use forums). The only one that from time to time *I* use is "Unread replies".
Quote from Nao on September 13th, 2012, 05:24 PM
- Readability of main text content. Because long lines make it harder to 'catch' the next line when reading, it's always recommended to do no more than 50-100 characters per line, I took the upper one and limited my widths to about 600 to 800 pixels in width on all my designs.
Taking the 1st line of the 1st message on this page:
800px: 74 chars
1024px:  63 chars
1024px (without sb): 102 chars
So in a typical 1024px screen the message area appears narrower than on a 800px (I know, I'm moving from a general statement to an actual example...I should have used the example first :P).

Funny enough the message area (that I think is the most important part of a topic) in a 1024x is 450px, that is less than half the size of the screen (44%) and the space actually filled with text is only ~386ps (38%, a bit more than one third of the screen size).
Quote from Nao on September 13th, 2012, 05:24 PM
Because today's displays can have largely varying widths (up from 2000px+ on Retina screens down to 320- on mobile phones), it's best to hide the sidebar on smaller displays, and have it in wider displays to give some additional content that would help eliminate the feeling that you're reading a single column of a regular paper if you're on a 600px wide column in a 2000px wide window... See what I mean.
That would work if the sidebar is visible for the entire length of the page, but at the moment is visible just in the first screen, going down the topic the result is a single narrow column (16 page-down long against 12 without sb)...and your signature is too wide for a 1024px monitor. ;)
From 1152px and up (provided that the forum is 100% wide) it should work. That said: I still hate all the empty space on the right. :P
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 16th, 2012, 06:34 PM
@To everyone: right now, the minimum version of PHP that may run Wedge is 5.2.3. I just found out that v5.2.4 can use "\h" to represent "[\t ]" in a regex (i.e. horizontal whitespace), and "\v" for "[\r\n]" (vertical whitespace), which is SUPER cool IMHO. I was wondering if anyone was against the idea of upping the minimum version to 5.2.4 just for that...? (Keeping in mind I may not even use it.)
Quote from emanuele on September 14th, 2012, 06:02 PM
That is exactly the reason I suggested a toggle: I already know that most of the things that are (and could be) in the sidebar on *any* forum are *for me* useless (dunno, most likely I have a rather peculiar way to use forums). The only one that from time to time *I* use is "Unread replies".
Okay, I guess the main point of doing that would be to save the bandwidth if you don't have a use for the sidebar. I can always set a max-width on the content itself to ensure it simply doesn't go beyond those boundaries, sidebar or not. It's not a bad suggestion, and it's very much possible to implement it as such because if my memory is correct, Wedge supports fallback target 'layers' for blocks, and if you don't provide one, it'll just skip showing it. So, a plugin author may choose to always have their contents appear, whether or not the sidebar is enabled, or just respect the sidebar's visibility by not providing a fallback.

That's doable. Anyone? Opinions?
Quote from Nao on September 13th, 2012, 05:24 PM
Funny enough the message area (that I think is the most important part of a topic) in a 1024x is 450px, that is less than half the size of the screen (44%) and the space actually filled with text is only ~386ps (38%, a bit more than one third of the screen size).
And...? :^^;:
Quote
That would work if the sidebar is visible for the entire length of the page, but at the moment is visible just in the first screen, going down the topic the result is a single narrow column (16 page-down long against 12 without sb)...and your signature is too wide for a 1024px monitor. ;)
My signature is precisely made to 'not' stretch (with a table) so that I can see how bad it looks at low res.
Posted: September 16th, 2012, 06:32 PM

Re: bad space at the right, I could use a position: fixed or something on the sidebar, or use JS to reposition it to always have the contents on the side, but that would mean having to ensure the sidebar height isn't bigger than your viewport height. That, or using JavaScript to help dynamically, ah ah... Lots of work, no time for that.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on September 16th, 2012, 08:01 PM
Quote
I was wondering if anyone was against the idea of upping the minimum version to 5.2.4 just for that...?
No objections whether you use it or not.
Quote
That's doable. Anyone? Opinions?
I think it's going to be awkward, because I suspect plugin authors will assume it's available. That said, provided that a good fallback can be achieved, it puts the control back in the plugin author's hands.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Farjo on September 17th, 2012, 02:47 PM
Just for your info, my webhosting packages are pretty cheap and one's 5.2.17 and the other is 5.3.10, so I can't see anyone being caught out on 5.2.3.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Norodo on September 17th, 2012, 03:38 PM
Quote from Nao on September 16th, 2012, 06:34 PM
@To everyone: right now, the minimum version of PHP that may run Wedge is 5.2.3. I just found out that v5.2.4[...]
I think I posted this about a year ago, but here it is updated, the information from all my providers (I use a slew of them, and most of them are common and will be used by Wedge users.). Min is obviously the lowest one, and for curiosity, I'll provide the max version and debian/rhel stable version number too.

PHP Min: 5.2.17 (Dreamhost) Max: 5.3.16 (Nearlyfreespeech) 5.3.3-7 (Debian) 5.3.2-6 (RHEL)
MySQL: Min: 5.1.47 (RHEL) Max: MariaDB 5.3 (Nearlyfreespeech) 5.1.63-0 (Debian) 5.1.47-4 (RHEL)

It seems that 5.2.4 is fine with virtually any host I can dig up. Godaddy also uses 5.2.17, so with Dreamhost+Godaddy on 5.2.17 that's a decent chunk of your userbase already up to date. Most other cheap hosts are likely to be around the same point, and by the time Wedge is final, I suspect very few will use PHP of as low verision as 5.2.3
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: MultiformeIngegno on September 17th, 2012, 06:19 PM
On my VPS I compiled PHP 5.4.7 so it's ok for me :lol: :eheh:
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Arantor on September 17th, 2012, 06:31 PM
IIRC XenForo also mandates a minimum of 5.2.4, so if others can do it, I don't see why we can't.
Title: Re: Getting ready for an alpha release: CSS fixes
Post by: Nao on September 17th, 2012, 06:42 PM
@Pete> Plugin authors shouldn't assume that it's available -- although it's very likely to be, there are plenty of ways to get rid of the sidebar (wetem method, or redefining the skin.xml skeleton without a <sidebar> entry...), and thus a fallback should be given, like I mostly do.

Re: PHP version, it was pretty much a given to me that 5.2.x isn't a problem as long as the x version is at least a couple of years old. We could even ask for 5.2.15 or something, it's still a two-year old version!
Still, I'm not so sure about using \h and \v right now... Especially \v. I'm not sure I understand this page correctly, which lists what they stand for:
http://stackoverflow.com/questions/3230623/filter-all-types-of-whitespace-in-php

I thought \h was 'only' a shortcut to [\t ] but it's actually way more than that, including non-breakable spaces, UTF8 special space characters, etc... I guess it's a bit overkill to use \h but probably less risky than using \v -- while \n will match all linebreaks in any system except for old MacOS (which I don't even think has decent server software available...), \v will match against \r as well, meaning that a Windows-made file will be seen as two linebreaks, and maybe it's not suitable for my code (I think it is, I just don't think it's worth testing against.)

Funny eh..?