如何改变xdebug输出的颜色?

ato*_*ton 3 html css php xdebug web

xdebug 的红色和黄色标准颜色在几个小时后会伤害你的眼睛。

http://www.designified.com/blog/article/76/restyling-xdebug-output描述了如何用需要jquery的javascript替换样式。

我一直在寻找一种更直接的方法,终于找到了一种。

ato*_*ton 5

解决方案是 !important 标签,它会覆盖现有的样式值。使用 xdebug 时使用以下 css 代码可以避免眼癌:

.xdebug-error {
    font-size: 12px !important;
    width: 95% !important;
    margin: 0 auto 10px auto !important;
    border-color: #666 !important;
    background: #ddd !important;
}

.xdebug-error th, .xdebug-error td {
    padding: 2px !important;
}

.xdebug-error th {
    background: #ccc !important;
}

.xdebug-error span {
    display: none !important;
}

.xdebug-error_description th {
    font-size: 1.2em !important;
    padding: 20px 4px 20px 100px !important;
    background: #ccc no-repeat left top !important;
}

.xdebug-error_callStack th {
    background: #666 !important;
    color: #ddd !important;
}
Run Code Online (Sandbox Code Playgroud)