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

Conversation

@helmutgranda
Copy link
Contributor

Adding list-style css example to support ticket issue #484.

@wbamberg wbamberg self-requested a review February 7, 2018 01:29
Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

One suggestion but, other than that, this looks great. Thanks @helmutgranda


<div id="output" class="output large hidden">
<section id="default-example" class="default-example">
<ul id="example-element" class="transition-all">

Choose a reason for hiding this comment

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

I would suggest adding some custom styling for the #example-element here as described in https://github.com/mdn/interactive-examples/blob/master/CONTRIBUTING.md#styling-the-example

All that is need is a fuller width, and bumping the font-size so that the image in the last example is clearer:

.default-example {
    font-size: 1.8rem;
}

#example-element {
    width: 50%;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schalkneethling, updates applied. I used 80% for example-element's width instead of 50% to prevent wrapping specially with little-roman example.

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

@schalkneethling , I had some comments on this as well, so please don't merge until I have had a chance to write them down :).

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

Thanks again for this contribution! I think this is also a tricky one, as it has quite complex syntax and it's challenging to choose just 6 representative values.

I had a few comments. I'll use a separate comment for each one, which I hope will make them more usable.

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

A couple of syntax variants that we could perhaps include, that are not in the current list:

  • just position
  • all three: position, image, type
  • another position, image, type, but where the image doesn't exist, to show the fallback to type

Unfortunately that gives us 7 :(

square
inside               
url('path/to/image.svg')
lower-roman inside
georgian inside url('path/to/image.svg')
georgian inside url('i-dont-exist.svg')
none

I'm really not sure which of these to omit. Perhaps lower-roman inside since that's implicitly covered in the 3 value syntax?

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

It would be worth thinking of how to show the effect of inside: it's not clear in this example as it stands. I did think about having a light background-color for the li items, and giving them a little horizontal padding to accentuate it. This shows that outside is outside the element, and inside is inside it:

Inside:

screen shot 2018-02-07 at 11 13 21 am

Outside:

screen shot 2018-02-07 at 11 13 28 am

Note though that this apparently does not work when you have 50% width on the ul.

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

I think it would be nice to make the actual list more concrete and fun, and give it an intro line saying what it's a list of.

Like:

Moons of Jupiter:

  • Callisto
  • Ganymede
  • Io
  • Europa

Or something else, but you get the idea :).

@wbamberg
Copy link
Contributor

wbamberg commented Feb 7, 2018

I don't think the Firefox icon looks good when it is scaled down this far. It would be worth trying to find a simpler SVG image (like a star or something), if you can find one that's public domain.

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.

@helmutgranda , thanks for the example! I did have a few comments, I hope they are helpful. Please feel free to let me know if you don't agree with them or are finding them hard to address :).

@helmutgranda
Copy link
Contributor Author

Thanks for the feedback @wbamberg, I have committed some changes based on your recommendations.

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

Couple of minor tweaks left over. Thanks so much @helmutgranda


.output section li {
background: #f1f8ff;
} No newline at end of file

Choose a reason for hiding this comment

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

Nit: missing empty line at the end of the file.

@@ -0,0 +1,61 @@
<section id="example-choice-list" class="example-choice-list large" data-property="list-style">

Choose a reason for hiding this comment

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

Super nit: For consistency with other files, please remove this empty line.

<span class="visually-hidden">Copy to Clipboard</span>
</button>
</div>

Choose a reason for hiding this comment

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

Super nit: For consistency with other files, please remove this empty line.

</g>
</g>
</g>
</svg> No newline at end of file

Choose a reason for hiding this comment

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

Nit: missing empty line at end of file. I would also suggest running this through https://jakearchibald.github.io/svgomg/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I didn't know about this tool.

@helmutgranda
Copy link
Contributor Author

I think this should be good to go now, all recommendations from @wbamberg and @schalkneethling in place.

Copy link
Contributor

@danielhickman danielhickman left a comment

Choose a reason for hiding this comment

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

Your other PR had these removed but maybe these changes should be made too on this PR.

@@ -0,0 +1,58 @@
<section id="example-choice-list" class="example-choice-list large" data-property="list-style">
<div class="example-choice" initial-choice="true">
<pre><code id="example_one" class="language-css">list-style: square;</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.

Looks like the id="example_one" boilerplate was missed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, in reality it was not missed. The boilerplate update was introduced after this PR ;) and I was not sure if the team was going to request updates to all PRs, either way I will be cleaning that up and submitting an update.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, totally. Awesome!

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

r+ from me, but I will wait for @wbamberg to review before merging. Thanks @helmutgranda

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.

Looks great, @helmutgranda , thanks so much for making those changes.

One very minor nit, but I'll approve this anyway.

One question though: I love the rocket icon, I think it's a great choice. Can you confirm that it's in the public domain (e.g. https://creativecommons.org/share-your-work/public-domain/) and we are therefore allowed to use it? Thanks!

</button>
</div>
</section>
<div id="output" class="output large hidden">
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: we should have an empty line between /section and div.

Copy link
Contributor Author

@helmutgranda helmutgranda Feb 8, 2018

Choose a reason for hiding this comment

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

Hey @wbamberg, I added the empty line.

In regards to the icon, I found it here:
https://openclipart.org/detail/266929/rocket
// updated URL for better source of rocket image.

Let me know if that works for this project or if I need to look somewhere else.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's perfect!

@wbamberg
Copy link
Contributor

wbamberg commented Feb 8, 2018

@danielhickman 's review is still outstanding, but I think the latest changes have removed the boilerplate, so I'm merging this :).

@wbamberg wbamberg merged commit 7fb171d into mdn:master Feb 8, 2018
@helmutgranda helmutgranda deleted the add-list-style-css-example branch February 8, 2018 20:13
@danielhickman
Copy link
Contributor

Yeah the changes were made. Was there something I should've done or should do in the future to mark my review as "approved"? I only thought I had suggesting power since I don't have push access.

@wbamberg
Copy link
Contributor

wbamberg commented Feb 8, 2018

Was there something I should've done or should do in the future to mark my review as "approved"? I only thought I had suggesting power since I don't have push access.

I'm not sure, but the "Reviewers" section of this PR looks like:

screen shot 2018-02-08 at 1 28 54 pm

...as if it wants your review approval. When I have requested changes I see something like this:

screen shot 2018-02-08 at 1 34 21 pm

...and can hit "approve changes" (or "Review changes->Approve" in https://github.com/mdn/interactive-examples/pull/547/files). But I don't know if you can, too.

In general I'd rather not merge stuff when someone else has outstanding comments, although your 'approval' could just be a comment saying "yes, that's fine" :). But in this case your comment seemed clear and I was pretty sure it had been addressed.

@danielhickman
Copy link
Contributor

Okay, that's helpful. I'll look out for those options in the future or leave a comment. Thanks.

wbamberg pushed a commit to wbamberg/interactive-examples that referenced this pull request Feb 8, 2018
* upstream/master:
  Adding list-style css example. (mdn#547)
  Flex examples (mdn#558)
  Add column examples (mdn#549)
  Remove CSS example id attributes (mdn#556)
  Add various text examples (mdn#545)
  Add contribution item (mdn#552)
  Adds @helmutgranda as contributor (mdn#550)
  Adding border radius example with recommended changes. (mdn#546)
  Add `quotes` example (mdn#543)
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.

4 participants