daisy / ebraille

Repository for developing use cases and standard for digital braille
17 stars 5 forks source link

Remove "various strings," adds wbr and ­ examples, and minor cleanup #253

Closed wfree-aph closed 2 months ago

wfree-aph commented 3 months ago

Removed "various strings" from box reserved class values.

Replaced br with wbr in multiline heading example. Also added a note explaining the preference for wbr over br.

Closed a p tag. Added a comma and space where it was previously missing in the paragraph reserved class values.

Fixes #227 Fixes #224


Preview | Diff

wfree-aph commented 3 months ago

@bertfrees Is it okay to use wbr for an example and then add a separate example that demonstrates text-wrap: balance? Or do we only need one or the other?

bertfrees commented 3 months ago

<wbr/>, being optional, will only be utilized if the display being used cannot accommodate the entire heading on one line.

I don't think it works like that. <wbr/> is for creating line break opportunities in places where a line would otherwise not be broken. E.g. it is typically used inside words.

Is it okay to use wbr for an example and then add a separate example that demonstrates text-wrap: balance? Or do we only need one or the other?

We could have the following examples:

wfree-aph commented 3 months ago

@bertfrees Would you mind reviewing these changes? I think my latest commits fixes my mistakes from earlier while also addressing the use of wbr.

wfree-aph commented 2 months ago

Removed that reference and now will merge. Thanks for the help cleaning it up!

bertfrees commented 2 months ago
  <p>
    foo<br class="for-width-50"/> bar
  </p>
  br[class^=for-width] {
    display: none;
  }
  @media (width > 49ch) and (width < 51ch) {
    br.for-width-50 {
      display: inline;
    }
  }

What do you guys think? Would it be good to include an example like the one I suggested above, to show how, when the layout needs to be optimized for a certain line length, it can be done in a way that it does not affect the layout for other line lengths?

It is perhaps somewhat advanced, but on the other hand an important selling point of eBraille is that it is dynamic, so it is useful to make people aware that there are some things you need to do to ensure that it stays dynamic.

wfree-aph commented 2 months ago

@bertfrees I can see the value in including that example. Probably would be important to specify the circumstances you would use this advanced version over a simpler method maybe.