Skip to content

Issue #848 - improve layout CSSFixme #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 31, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions webcompat/static/css/development/components/cssfixme.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/*----------cssfixme----------*/

:root {
--CSSFixme-backgroundColor : rgba(249, 249, 249, 0.6);
--CSSFixme-backgroundColorStrong: var(--wc-background-dark);
}

.wc-CSSFixme {
font-size:var(--base-font-size);
}
Expand All @@ -9,12 +14,23 @@
margin-top: 1em;
}

/* instruction */
.wc-CSSFixme-instruction {
margin-left: 1em;
font-size: 1.1em;
}

/* pre */
.wc-CSSFixme-resultat {
.wc-CSSFixme-resultat
.wc-CSSFixme pre {
margin: 1em 0;
padding: 1em;
color: #414042;
border: 1px solid #ddd;
border-radius: .3em;
background: rgba(249, 249, 249, 0.6);
background: var(--CSSFixme-backgroundColor);
}
/* element modify */
.wc-CSSFixme-resultat strong {
background-color: var(--CSSFixme-backgroundColorStrong);
}
24 changes: 19 additions & 5 deletions webcompat/templates/cssfixme.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@
{% include "shared/nav.html" %}
<main class="wc-content wc-content--body" role="main">
<div class="wc-CSSFixme">
<p>This tool attempts to fix non-standard CSS by adding standardised equivalents to all declarations that use <em>-webkit-</em>prefixed properties and values that have standardised equivalents. The standardised syntax is not always same as the -webkit- syntax, so getting everything right is a challenge. Please test this tool with various <em>-webkit-</em> prefixed CSS constructs and let us <a href="https://github.com/webcompat/css-fixme/issues">know</a> if you find problems.</p>
<p>Note: some <em>-webkit-</em> prefixed properties do not (yet?) have standardised equivalents. This tool will deliberately not add pseudo-standard code on the assumption that the standards will one day match the current -webkit- implementation.</p>
<p>This uses the <a href="https://github.com/reworkcss/rework">ReworkCSS</a> library for parsing and stringifying CSS.</p>
<p>Paste CSS in this box to see what needs fixing:</p>
<h1 class="wc-Title wc-Title--l">CSS Fix Me</h1>
<div class="wc-CSSFixme-instruction">
<div class="wc-CSSFixme-item">
<strong>You:</strong> paste the CSS instructions
</div>
<div class="wc-CSSFixme-item">
<strong>Us:</strong> add missing standard properties
</div>
<div class="wc-CSSFixme-item">
<strong>Them:</strong> have a satisfied Web experience. Happy users.
</div>
</div>
<div class="wc-CSSFixme-item">
<textarea class="wc-Form-input " style="height:20rem;">{{ csscode }}</textarea>
</div>
Expand All @@ -20,7 +28,13 @@
<button type="button" class="Button Button--default" id="btn_do_fixup">Add standard equivalents for prefixed CSS</button>
</div>
<div class="wc-CSSFixme-item">
<pre class="wc-CSSFixme-resultat" id="fixedcss"></pre>
<div id="js-CSSFixme"></div>

This comment was marked as abuse.

</div>
<div class="wc-CSSFixme-item">
<p>This tool attempts to fix non-standard CSS by adding standardised equivalents to all declarations that use <em>-webkit-</em>prefixed properties and values that have standardised equivalents. The standardised syntax is not always same as the -webkit- syntax, so getting everything right is a challenge. Please test this tool with various <em>-webkit-</em> prefixed CSS constructs and let us <a href="https://github.com/webcompat/css-fixme/issues">know</a> if you find problems.</p>
<p>Note: some <em>-webkit-</em> prefixed properties do not (yet?) have standardised equivalents. This tool will deliberately not add pseudo-standard code on the assumption that the standards will one day match the current -webkit- implementation.</p>
<p>This uses the <a href="https://github.com/reworkcss/rework">ReworkCSS</a> library for parsing and stringifying CSS.</p>
<p>Paste CSS in this box to see what needs fixing:</p>
</div>
{%- block extrascripts -%}
{%- if config.PRODUCTION or config.DEVELOPMENT -%}
Expand Down