Skip to content
This repository was archived by the owner on Oct 17, 2025. It is now read-only.

Conversation

@rachelandrew
Copy link
Collaborator

A set of examples for logical properties. I have tried to keep these consistent with their physical counterpart examples, which I think makes sense, although these need to show the changes in Writing Mode or direction.

Copy link
Contributor

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rachelandrew , really nice work. I had a few comments but they are all minor. The main thing I think is to make sure the choices fit without scrolling.

It is correct that Chrome does not support these, or have any immediate plans to[1]? Caniuse is confusing me: https://caniuse.com/#feat=css-logical-props.

[1] https://www.chromestatus.com/feature/6325742262550528

<div id="example-element" class="transition-all">This is a box with a border around it.</div>
</section>
</div>

No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files should end with a blank line (here and in some of the other HTML files in the PR).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think they all do end in a blank line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like they end with a line containing only 4-spaces, but I don't think it's worth not merging for :).

<div class="example-choice" initial-choice="true">
<pre><code class="language-css">block-size: 150px;
writing-mode: horizontal-tb;
</code></pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading spaces here are giving us an extra blank line in the example, here and in all, or anyway most, of the HTML files.

<div class="example-choice">
<pre><code class="language-css">border-inline-end-color: rgb(170, 50, 220, .6);
writing-mode: horizontal-tb;
direction: rtl;</code></pre>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this choice is 3 lines, this example (and all the inline ones I think) is going to overflow, which I would like to avoid.

I think I'd suggest only having 3 examples, and dropping the 4th one:

border-inline-end-color: hsl(60, 90%, 50%, .8);
writing-mode: vertical-lr;

...which is close enough to the second:

border-inline-end-color: #32a1ce; 
writing-mode: vertical-rl;

Does that sound OK to you?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, I've updated the inline ones accordingly.


<div id="output" class="output large hidden">
<section id="default-example" class="default-example">
<div id="example-element" class="transition-all">This is a box where you can change the block-size.</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be inline-size?

height: 33.33%;
display: inline-block;
border: solid #5B6DCD 10px;
background-color: rgba(229, 232, 252, 0.6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please omit leading zeroes: 0.6 -> .6.


#example-element {
border: solid 10px #FFC129;
background-color: rgba(255, 244, 219, 0.6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, please omit leading zeroes: 0.6 -> .6.

.col {
width: 33.33%;
border: solid #5B6DCD 10px;
background-color: rgba(229, 232, 252, 0.6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, please omit leading zeroes: 0.6 -> .6.


#example-element {
border: solid 10px #FFC129;
background-color: rgba(255, 244, 219, 0.6);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, please omit leading zeroes: 0.6 -> .6.

@@ -0,0 +1,44 @@
<section id="example-choice-list" class="example-choice-list large" data-property="padding-block-start">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be padding-block-end.

@rachelandrew
Copy link
Collaborator Author

Made a bunch of updates to address the requests. Chrome doesn't support these yet, would be good to apply some encouragement there, as having to use the physical properties with writing modes is horrible.

Also, some of the nits (leading zeros and so on) were values copied over from the physical examples which are a bit untidy compared to the new ones. I might do a round of tidying up at some point to make things consistent.

@wbamberg
Copy link
Contributor

Thanks @rachelandrew , for these updates! They look really good, and I appreciate the consistency with the physical properties.

Also, some of the nits (leading zeros and so on) were values copied over from the physical examples which are a bit untidy compared to the new ones. I might do a round of tidying up at some point to make things consistent.

Sorry about that. I've not been very consistent in picking these things up. I know Schalk has plans to have these things linted automatically, which will be great.

I might do a round of tidying up at some point to make things consistent.

That would be awesome. Maybe it would be worth waiting until we have linting, then it can find the places to update?

Copy link
Contributor

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rachelandrew , this is a really nice set of examples.

<div id="example-element" class="transition-all">This is a box with a border around it.</div>
</section>
</div>

No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like they end with a line containing only 4-spaces, but I don't think it's worth not merging for :).

@wbamberg wbamberg merged commit 1b556d9 into mdn:master Feb 22, 2018
wbamberg pushed a commit to LLyaudet/interactive-examples that referenced this pull request Feb 23, 2018
…tical-align

* upstream/master:
  Logical properties (mdn#598)
  Revert "Adds next iteration of the HTML interactive editor (mdn#576)" (mdn#605)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants