Last Comment Bug 779566 - CSS columns: incorrect alignment in right-aligned documents
: CSS columns: incorrect alignment in right-aligned documents
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
-- normal with 1 vote (vote)
: mozilla17
Assigned To: Scott Johnson (:jwir3)
: Jet Villegas (:jet)
Depends on:
  Show dependency treegraph
Reported: 2012-08-01 11:04 PDT by spammed.user
Modified: 2012-08-02 06:22 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

b779566 (5.56 KB, patch)
2012-08-01 13:39 PDT, Scott Johnson (:jwir3)
roc: review+
Details | Diff | Splinter Review

Description User image spammed.user 2012-08-01 11:04:51 PDT
In right-to-left documents, columns align to the left instead of aligning right. See visualization here:
Comment 1 User image Scott Johnson (:jwir3) 2012-08-01 12:09:55 PDT

At first glance, it seems that you point out an issue with how our column boxes are being placed. However, if you look at a slight modification to the same jsfiddle:

We render the same as in google chrome. So, it seems that our placement of column boxes is incorrect when in rtl mode and when we don't have enough column boxes to fill the requested number of columns:

(In the second example, we only have 2 columns, even though the author requested 4). If we make the number of columns requested equal 2, then we get:

Which is correct. So, I think that we need to handle the above case a little bit better. This shouldn't be too difficult... I'll see what I can do.

Thanks for the bug submission!
Comment 2 User image Scott Johnson (:jwir3) 2012-08-01 13:39:01 PDT
Created attachment 648062 [details] [diff] [review]

Patch that removes some code that doesn't appear to be needed any longer. This is the code that is causing the RTL columns to be aligned to the left if we don't have enough content to fill the requested number of columns. 

Alternatively, I could detect the case where we have enough content to get the requested number of column boxes, and then leave this code in, with the added condition that it only happens when there is enough content. (I thought this method simplified the code, but it might be doing something that I don't immediately see, in which case, we'd want to leave it in).
Comment 3 User image Scott Johnson (:jwir3) 2012-08-01 19:55:11 PDT
Comment 4 User image Ed Morley [:emorley] 2012-08-02 06:22:17 PDT

Note You need to log in before you can comment on or make changes to this bug.