Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programmieren:php:debug [2020/03/09 19:11] – external edit 127.0.0.1programmieren:php:debug [2022/12/17 12:28] (current) – external edit 127.0.0.1
Line 23: Line 23:
  echo "</div>";  echo "</div>";
 }; };
 +</code>
  
 +===== Optionales CSS Styling =====
 +
 +Es kann schon auch Sinn machen, die Ausgabe der Debug-Funktion ein wenig zu stylen. Hier ein Beispiel CSS-Code der die Box in einen gelblichen "Message" hüllt:
 +
 +<code css>
 +.debug{
 + display          : block;
 + margin           : 22px;
 + padding          : 11px;
 + max-width        : calc( 100% - 44px );
 + background-color : rgb(255 245 225);
 + border-left      : 11px solid rgb(255,200,0);
 +}
 +.debug__title{
 + margin      : 0px 0px 22px 0px;
 + font-family : -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;
 + font-weight : 600;
 + font-size   : 18px;
 + line-height : 22px;
 + color       : rgb(255,200,0);
 + text-shadow : 1px 1px 2px rgba(125,100,0,0.3);
 +}
 +.debug__print{
 + margin      : 0px;
 + padding     : 0px;
 + font-family : Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
 + color       : rgb(90,90,90);
 + font-size   : 12px;
 + line-height : 22px;
 +}
 </code> </code>
 +

Page Tools