Giter Site home page Giter Site logo

<samp> is used incorrectly about mvp HOT 5 CLOSED

andybrewer avatar andybrewer commented on August 10, 2024 12
is used incorrectly

from mvp.

Comments (5)

chris-morgan avatar chris-morgan commented on August 10, 2024 1

@DiemenDesign: incidentally, that document is thoroughly obsolete (though it hasn’t changed terribly much since then). https://html.spec.whatwg.org/#the-samp-element is the current spec. Remember also that most of the specification is intended for implementers (browsers, &c.) rather than authors (yeah, even when looking at the authors edition of the spec which shifts the balance a little). With that understanding, I see no mess at all. MDN is agreed upon by browser makers as the canonical (though non-normative) source of information for document authors; see https://developer.mozilla.org/en/docs/Web/HTML/Element/samp.

from mvp.

philp avatar philp commented on August 10, 2024

Inclined to agree here. Even though you might have semantic HTML, styling any element within a <p> as display: block is still considered semantically incorrect.

Nothing wrong with <p><samp>...</samp></p> though, which gives you best of both worlds!

from mvp.

andybrewer avatar andybrewer commented on August 10, 2024

Thanks @chris-morgan ! This was a tricky one for me to decide on and I saw different articles recommending different approaches. I think I was trying to be too clever in ditching the <pre> tag. I'll make a fix in the next version.

from mvp.

DiemenDesign avatar DiemenDesign commented on August 10, 2024

Love Mozilla myself, have you checked what W3C says about the <samp/> element?
https://www.w3.org/TR/2011/WD-html5-author-20110809/the-samp-element.html
Wish they would redesign and reformat their documentation, it's such a mess.

from mvp.

andybrewer avatar andybrewer commented on August 10, 2024

Thank you @chris-morgan - just implemented this in v1.1

from mvp.

Related Issues (20)

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.