Closed adelura closed 9 years ago
These are basic styling. If your codemirror element must be styled differently, then style your codemirror element differently using higher-specific selectors.
This is not a basic style... Each pre element (each line) has blue border-left
.
Well, it has. So remove it from your CodeMirror by writing a rule in your page's stylesheet. Samples framework exposes basic styling and this, in my opinion, is a basic styling.
BTW. If CodeMirror uses <pre>
for each line it is its business, but it doesn't look like a normal way of using <pre>
elements.
It doesn't bring consistency in framework: if we want to create a fancy button we have to add special classes to <a>
element. The same for diffrent stuff. General rule - of you want to add some apply some style or behaviour add class. But for <pre>
it work just because.
Because these are very different cases. You said yourself that you want to make your link a fancy button. If you want to "make it", then you need to add a class. With default elements' styling it's very different. In this case you create a preformatted block and you want it to be a preformatted block - nothing else. So you don't add any class, but it should be still styled.
We moved the discussion to priv chat. The outcome is - both points may be valid, but in this framework we assumed that <pre>
is one of typographical elements (like <h1>
, <p>
, <a>
) and should have default styling. Whether this assumption makes sense anyone can answer differently, but a decision was made. The main argument for it was that writing content (of the SDK, samples, docs) must not require adding everywhere classes, because this would be absolutely irritating.
BTW. This shows how we expect that these situations will be handled - https://github.com/cksource/samples-framework/blob/master/docs/less/docs.less#L29
Selectors here are too general. It influence my codemirror element :(
We should introduce some class which will be applied to
<pre>
element and then CSS will work - but not by default.