Skip to content

Protect against 'you must use border-box'#2210

Closed
reverofevil wants to merge 1 commit intocodemirror:masterfrom
reverofevil:master
Closed

Protect against 'you must use border-box'#2210
reverofevil wants to merge 1 commit intocodemirror:masterfrom
reverofevil:master

Conversation

@reverofevil
Copy link
Copy Markdown

No description provided.

@marijnh
Copy link
Copy Markdown
Member

marijnh commented Feb 3, 2014

I don't like using .something * rules very much. Is there a specific problem you are addressing with these? Could we fix it with specialized rules?

@reverofevil
Copy link
Copy Markdown
Author

.class * rules were used in Bootstrap, so I decided to add the ones which
return browser's default behaviour. The specific problem is that due to
border-box rendering line numbers are (roughly) centered in the gutter.
It's possible that there're some other problems, including plugin-specific
ones. Forced border-box is not a good idea anyway, and I don't know how
could it be fixed to make CM rendering-agnostic.

2014-02-03 Marijn Haverbeke notifications@github.com:

I don't like using .something * rules very much. Is there a specific
problem you are addressing with these? Could we fix it with specialized
rules?

Reply to this email directly or view it on GitHubhttps://github.com//pull/2210#issuecomment-33930635
.

marijnh added a commit that referenced this pull request Feb 3, 2014
(Border-sizing on the CodeMirror-linenumber class)

Issue #2210
@marijnh
Copy link
Copy Markdown
Member

marijnh commented Feb 3, 2014

I agree that yes, this'll mess with 3rd party code. But so would your patch, since a widget expecting bootstrap-style border boxes might be present inside a widget in a CodeMirror editor. There is no perfect solution here (except for Bootstrap changing their approach, which seems unlikely). The reason I dislike blanket * rules is that they tend to produce unexpected effects.

Does attached patch, and the understanding that 3rd party code will have to fix this for themselves, work for you?

GerHobbelt pushed a commit to GerHobbelt/CodeMirror2 that referenced this pull request Feb 8, 2014
(Border-sizing on the CodeMirror-linenumber class)

Issue codemirror#2210
@marijnh marijnh closed this Feb 11, 2014
anaran pushed a commit to anaran/CodeMirror that referenced this pull request Feb 22, 2014
(Border-sizing on the CodeMirror-linenumber class)

Issue codemirror#2210
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants