Coder Social home page Coder Social logo

Comments (4)

jhildenbiddle avatar jhildenbiddle commented on May 23, 2024 1

Changes have been released as 1.2.0.

from vertical-rhythm-reset.

jhildenbiddle avatar jhildenbiddle commented on May 23, 2024

All fair points, @Lamecarlate. 😄

I've made a handful of changes in a separate reset_update branch. Here are the notes from the CHANGELOG in that branch:

  • Added default font-style: italic rule for em and i elements.
  • Added fieldset padding fix.
  • Added additional reset rules from normalize.css v8.0
  • Updated font reset to only affect font-family and font-size instead of all
    font properties. (#2)
  • Updated vertical-alignment property of sub and sub elements. (#2)
  • Removed font-size rule from preformatted elements (code, kbd, pre, and
    samp).

A few items worth mentioning:

  1. With the current version (1.1.1), both <b> and <strong> elements should be styled with font-weight: bolder. You can verify this by viewing the demo on Codepen.io. Perhaps you have some other reset code in your app that is setting these elements to font-weigh: normal? Here are the styles added by _vertical-rhythm-reset.scss:

    // Add the correct font weight in Chrome, Edge, and Safari
    b,
    strong {
    font-weight: bolder;
    }

  2. You are correct about the missing <i> and <em> styles though. Not sure how I missed those, but they've been added to the (soon to be released) update.

  3. Replacing the universal font: inherit reset rule with font-family: inherit; font-size: inherit; means elements will render with their default font-weight and font-style values. This isn't necessarily a bad thing, but it is different than the currently released version (1.1.1). There are two paths forward, and I'm wondering which you prefer:

    1. Replace the font: inherit reset rule and let elements render using their default font-style and font-weight values. This means elements like <h1>-<h6>, <th>, and <optgroup> will render using font-weight: bold via user agent styles. This is other CSS resets like normalize.css behave.

    2. Retain the font: inherit reset rule and specify font-style and font-weight properties for specific elements like <b>, <strong>, <i>, and <em>. This will keep the output similar to the currently released version, but ensure that the elements most expect to be bold or italic are styled appropriately.

    FWIW, I'm leaning towards the first option.

Remember, these changes are not yet available via npm/unpkg, so you'll need to manually download _vertical-rhythm-reset.scss to test out the changes. Once I get a thumbs up, I'll publish a new version with the changes (1.2.0).

Thanks for taking the time to provide your feedback. Much appreciated!

from vertical-rhythm-reset.

Lamecarlate avatar Lamecarlate commented on May 23, 2024

Oh my, I'm sorry I didn't answer… (well, I had network problems, then no computer for days)

I had no time to test the points you're mentionning, I'll do that soon.

from vertical-rhythm-reset.

jhildenbiddle avatar jhildenbiddle commented on May 23, 2024

No worries, @Lamecarlate. Just let me know when you've had time to review along with any feedback you may have. As I said, once I get a thumbs up I'll push 1.2.0 to NPM.

from vertical-rhythm-reset.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.