In all places where a "Spacing to Contents" (= "padding" in CSS) can be set between the borders and the text area (e. g. for pages or text frames), the padding is ignored by the horizontal and vertical rulers. The rulers always cover the entire box (including the padding) instead of only the text area. This is extremely ugly and affects all elements whose coordinates are based on the rulers (e. g. paragraph indent and tab markers), which are no longer in place when some "Spacing to Contents" is used.
A common example are pages that require full-page backgrounds and therefore use "Spacing to Contents" instead of page margins (see bug 33041, comment 34): If the proposed solution is applied, the rulers cover the entire page instead of only the text area.
I suggest to always align the rulers to the pure text area (excluding both margins and padding). This should be done consistently for pages, text frames and any other places that might apply.
This will probably require testing with multi-column settings and might even affect compatibility with older documents, yet it is still the "cleanest" approach IMHO. In fact, the rulers should really have accounted for the padding in the first place, and maybe an according compatibility setting is enough to resolve any potential backwards compatibility issues.
Steps to Reproduce:
(see bug 33041, comment 34)
Rulers cover the entire box.
Rulers should only cover the text area.
User Profile Reset:
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0
Don't agree, the ruler is picking up the object. In text areas that is the frame object holding the text or the page to margins. The ruler is more commonly useful to adjust layout of the objects _including_ the padding.
Measuring/fitting the width of just the text, or image, or fill is the secondary use case would not be helpful as default.
Could see some use to a toggle, but not as default behavior.
Don't seem much value to this, NAB so -> Enhancement at best if some UX driven need to pursue.
(In reply to V Stuart Foote from comment #1)
> [...] The ruler is more commonly useful to adjust layout of the objects
> _including_ the padding. Measuring/fitting the width of just the text,
> or image, or fill is the secondary use case [...]
Fully disagree in every respect.
However, having that said ...
> Could see some use to a toggle, but not as default behavior.
... a toggle switch is still a good idea and would probably satisfy everyone, provided that the switch can be set *permanently* so that it effectively becomes the default behavior for new documents.
> Don't seem much value to this, NAB so -> Enhancement at best
Without this being fixed, the proposed solution to bug 33041 is severely impaired and no more practical.
(In reply to Lenge from comment #2)
> Without this being fixed, the proposed solution to bug 33041 is severely
> impaired and no more practical.
With due respect for your wishes and opinion, does this sound a bit strongly expressed.
Created attachment 135698 [details]
Comparision LibO vs. Word
We have various methods in LibreOffice to add spacing: page margins and border padding as well as paragraph indentation and padding. Today the rulers indicate the page margins and you suggest to use the actual text position. Attached a screenshot including how Microsoft deals with the topic. Used 1cm left margin and 2cm padding for the page and 2cm indentation of first line plus 1cm padding on the paragraph.
Big advantage would be that grips become aligned with the text. There is also a difference for the ruler edges that are linked to the margins excluding the padding currently.
I vote for this change. We loose the margin information (could introduce a vertical line in the ruler for this) with the benefit of a more intuitive and familiar UI.
(In reply to Cor Nouws from comment #3)
> With due respect for your wishes and opinion, does this sound a bit strongly
Didn't mean to offend anybody (sorry if I did though). Just wanted to (strongly) express that - with respect to bug 33041 - this *is* a major issue as it severely impairs the proposed solution/workaround.
The current behavior is really odd: If you align text to tab at 5 cm and then replace the 2 cm page margins with a 2 cm padding (for the sole purpose of making the background full-page), then the horizontal ruler will move left by 2 cm *including* the tab marker while the text itself stays in position (*including* the text aligned to that tab). In effect, all ruler-based text markers (idents, tabs, etc.) are now visually "out of sync" with the actual text, which I consider more of a bug than an enhancement.
However, I am fine with Stuart's idea to make this an optional (switchable) feature that can be set as default for new documents on a per-user basis. But it should definitely be fixed.
We talked about the topic in the design meeting. The current default is useful and works well in most situations. The advice is to keep the default; if someone wants to introduce alternatives like different bounding boxes (https://wiki.scribus.net/canvas/PDF_Boxes_:_mediabox,_cropbox,_bleedbox,_trimbox,_artbox) those should be available in tools > options.
Summary updated from the original title 'Rulers ignore padding ("Spacing to Contents")'.