Code Monkey home page Code Monkey logo

quirks's People

Contributors

annevk avatar cvrebert avatar danmulvey avatar domenic avatar foolip avatar sideshowbarker avatar zcorpan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quirks's Issues

Percentage height calculation quirk does not seem to match implementations

The percentage height calculation quirk seems to use the initial containing block for the containing block. But actual implementations do something where they take the margins and padding of the <body> and <html> into account, as far as I can tell. This section probably needs more testing of what the actual browser behavior is, especially since some of the tests for this part of the spec are not passed by any browser per https://wpt.fyi/results/quirks/percentage-height-calculation.html

spec for comparing class names

Hi,

I found in DOM Living Standards the spec about comparison of class names on quirks mode.
https://dom.spec.whatwg.org/#concept-getelementsbyclassname

What about mentioning it in the quirks spec?

Those who wanna know about browsers' behavior on quirks mode may read the quirks spec. Actually, when I searched "spec for quirks mode", I found it. But they perhaps won't try to also check the dom living standards out.
So I think it would be nice to put the spec of comparison of class names on the spec of quirks mode.

Thank you for reading😊

Should we do percentage height quirk for calc()?

The spec applies percentage height quirk only when

... the specified value for the height property of element is a <percentage>, ...

which means we should apply the quirk for % heights but shouldn't for calc(length + %) heights.

Currently, only Firefox does that. Chrome, EdgeHTML and Safari apply the quirk also on calc() heights.

Should we change the spec to match the behavior of Chrome & Edge & Safari?

Also @bfgeek @bzbarsky @lilles from the related Chromium bug https://crbug.com/388892

List item forces strict line height

It seems that all browsers agree that list items disable the line height quirk [1] on ALL lines. I'm guessing this was added to make sure that there always be room for the list item marker, although that doesn't really explain why it should be like this on every line in the list item. Doing it on the first line (where the list item marker is) would have been good enough.

One implementation difference: Gecko triggers on HTML LI elements, while the others trigger on CSS display:list-item

Example:

<!-- quirks mode -->
<p>There should be a filled green square below, and no red.</p>
<div style="width:100px; height:100px; background:red;">
  <li style="line-height:50px; color:green; background:green;">
    <br>
    <div style="display:inline-block; width:1px; height:1px;"></div>
  </li>
</div>

Try changing from LI to DIV and observe the changes.

[1] https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

Check quirks' behavior in vertical writing modes

Currently
https://quirks.spec.whatwg.org/#the-html-element-fills-the-viewport-quirk
and
https://quirks.spec.whatwg.org/#the-body-element-fills-the-html-element-quirk
consider writing modes (but possibly badly, in particular if html and body have different writing modes)

but the rest of the quirks have not been tested in vertical writing modes. Need to test what browsers do and possibly update the spec to match the majority, or what makes most sense if there's no interop.

cc @litherum

Simplifying the hover and active quirks?

What is the issue with the Quirks Mode Standard?

https://quirks.spec.whatwg.org/#the-active-and-hover-quirk has a list of conditions that doesn't keep up with new CSS features.

It seems implementations do subtly different things that end up in subtle bugs like https://bugzilla.mozilla.org/show_bug.cgi?id=1856285:

I think Blink's behavior (which if I understand correctly is "only apply the quirk if the only thing in the selector is :hover or :active and it's not nested) is simpler, and I think we should change the spec to match that, if my understanding is correct.

@lilles / @andruud: Could you confirm my read of Blink's source is correct?
@annevk: Would WebKit be fine with that change? If so I'd be happy to send a PR.

cc @whatwg/css, I assume making stuff less quirky is generally good if we can get away with it...

Document the table-cell-eats-margins quirk

Testcase:

<table border>
<td><h1>foo</h1><h2>bar</h2><p>baz
</table>

The h1's top margin and the p's bottom margin both get "eaten". This works in both Firefox and Chrome (didn't test others).

Wrinkles: a manually specified margin does not get eaten:

<table border>
<td><h1 style="margin-top:1em">foo</h1><h2>bar</h2><p>baz
</table>

Replaced content percentage height resolution inside tables

There's an undocumented quirk regarding percentage block-size replaced elements inside table cells. This quirk is implemented by EdgeHTML, Chromium, and WebKit (but not Gecko, it seems, at least not with the test I'm presenting here):

<!-- quirks mode -->
<style>
  .cell {
    display: table-cell;
    width: 400px;
    height: 400px;
    background: red;
  }

  .descendant {
    display: block;
    margin: 0;
    border: none;
    padding: 0;
    width: 100%;
    height: 100%;
    background: green;
  }
</style>

<p>Green square below?</p>
<div class="cell">
  <div>
    <iframe class="descendant"></iframe>
  </div>
</div>

The percentage height specified on .cell is used to resolve the height of .descendant. This doesn't happen if .descendant is a DIV instead of an IFRAME.

This quirk is not documented at https://quirks.spec.whatwg.org/

Update tests for "html and body elements fill the viewport" spec change

Need to update http://w3c-test.org/quirks-mode/percentage-height-calculation.html

to test for this spec change: c81e2a2

commit c81e2a263fb9f89fdfc55010afe666f1711540b7
Author: Simon Pieters <[email protected]>
Date:   Tue May 3 17:43:01 2016 +0200

    Specify how html and body elements fill the viewport
    
    WebKit, Chromium and Edge implement this quirk. The spec was
    previously using Gecko's approach, but now Gecko wants to copy
    this quirk [1]. I based the spec on Chromium's implementation and
    tested in Chromium and Edge.
    
    The spec is stricter than browsers in that it requires the
    document element to be an html element, and it requires the
    body element to be "the document's body element" (as opposed to
    any body), to be consistent with e.g. 'background-color' on body.
    
    Chromium and Edge are inconsistent in their behavior when html
    and body have different writing modes:
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4149
    
    Other tests:
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4148
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4146
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4142
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4150
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4139
    http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4138
    
    [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1259924#c9

cc @dbaron

Missing tests are causing master to fail

FATAL ERROR: There are 2 WPT tests underneath your path prefix aren't in your document and must be added:
  quirks/line-height-trailing-collapsable-whitespace.html
  quirks/vertical-align-in-quirks.html

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.