Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_default_computed_style.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/layout/style/test/test_default_computed_style.html


<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=800983
-->

<head>
  <meta charset="utf-8">
  <title>Test for Bug 800983</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  <style>
    #display::before { content: "Visible"; display: block }
    #display {
      display: inline;
      margin-top: 0;
      background: yellow;
      color: blue;
    }
  </style>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=800983">Mozilla Bug 800983</a>
<p id="display"></p>
<div id="content" style="display: none">
  
</div>
<pre id="test">
<script type="application/javascript">

/** Test for Bug 800983 **/
var cs = getComputedStyle($("display"));
var cs_pseudo = getComputedStyle($("display"), "::before")

var cs_default = getDefaultComputedStyle($("display"));
var cs_default_pseudo = getDefaultComputedStyle($("display"), "::before");

// Sanity checks for normal computed style
is(cs.display, "inline""We have inline display");
is(cs.marginTop, "0px""We have 0 margin");
is(cs.backgroundColor, "rgb(255, 255, 0)""We have yellow background");
is(cs.color, "rgb(0, 0, 255)""We have blue text");
is(cs_pseudo.content, '"Visible"'"We have some content");
is(cs_pseudo.display, "block""Our ::before is block");

// And now our actual tests
is(cs_default.display, "block""We have block display by default");
is(cs_default.marginTop, "16px""We have 16px margin by default");
is(cs_default.backgroundColor, "rgba(0, 0, 0, 0)",
   "We have transparent background by default");
is(cs_default.color, "rgb(0, 0, 0)""We have black text by default");
is(cs_default_pseudo.content, "none""We have no content by default");
is(cs_default_pseudo.display, "inline""Our ::before is inline by default");


</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik