Open BDeveau opened 7 years ago
Indentation Values Per @janasoroczak: h2: none h3: 15px h4: 30px h5: 45px h6: 60px
Can we first try this with some site styles and see if it still makes sense?
We can add the settings to the document settings for the site and get a preview that way.
Also, I wish we used ems or rems, but I don't think we are set up properly for that :/
@caffodian Could you clarify what is meant by site styles? I came up with these numbers by playing with styles in Chrome Inspector.
https://pstatdev.pstatbeta.com/admin/doc_settings/ <-- no code changes needed
Need code changes for the indentation to apply to all children. Without which, indenting only headings and not contents is not going to test well anyways.
how so?
HEADER
subtext for that header
SUBHEADER
subtext for that
HEADER
subtext for that header
SUBHEADER
subtext for that
... looks weird, and unclear without. IMHO.
No, I mean, why does it need code changes?
I think you can just use a sibling selector (https://developer.mozilla.org/en/docs/Web/CSS/General_sibling_selectors) and it lasts until the next such selector takes effect
OH RIGHT.. hmmmmm.. testing now
Some change should make it into this code base eventually. But we should make sure everyone accepts the styling (and make sure we don't have unintended consequences on real documents - for example printer friendly sizing )
Sibling Selectors don't work quite as expected...
The ~ combinator separates two selectors and matches the second element only if it is preceded by the first, and both share a common parent
This comes out as
h1
p
h2
p
h3
p
p
p
all future paragraphs are indented to the last indentation level, even if not intended to be a part of it, because they all share the common parent of document-body.
Why are they not intended to be part of it? Because of the break in between?
Yes, I mean as long as you're sticking into the structure it works ok, but would that meet user's expectations? They'd need another H1/2 to bring it back into left aligned. Maybe that's not a big deal.
Nope, nevermind. This happens:
h1
p
h2
p
h3
p
h1
p
it doesn't reset back
Does it do that if the last h1 is an h2 instead?
My guess is you might have forgotten to have an h1 sibling selector because it's not indented. I could be wrong and I use a lot of reference when playing with general selectors though
Yes, because all previous levels of indentation are being applied to thelast P, and it's taking the largest value.
:(
It would be nice if one of the approaches in there works. I'm a bit worried about adding more classes than strictly needed
On the PolicyStat side, it just means more show changes cases to handle :(
Phase 1
Phase 2