Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fixed: #1863 Selector width info is wrong when no space before '{' #3082

Merged
merged 5 commits into from
Mar 14, 2013

Conversation

WebsiteDeveloper
Copy link
Contributor

Fixed: #1863 and also fixed a few other cases where selection was incorrect

@ghost ghost assigned redmunds Mar 11, 2013
@redmunds
Copy link
Contributor

This looks good.

Can you add some unit tests to the CSSUtils tests with rules as follows:

  • rule with no whitespace between selector and opening brace
  • rule with the brace on the line following as the selector with no indent
  • rule with the brace on the line following as the selector and indented

@redmunds
Copy link
Contributor

Done with initial review.

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds i added the unit tests and also fixed a few more edge cases

beforeEach(function () {
init(this, selectorPositionsFileEntry);
runs(function () {
selectors = CSSUtils.extractAllSelectors(this.fileCssContent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're using the same .css file for all tests in this section, and the file is not being edited, there's no need to run extractAllSelectors() (which is not cheap) before each test. The tests will run faster if this is done only once.

@redmunds
Copy link
Contributor

Done with second review.

@WebsiteDeveloper
Copy link
Contributor Author

@redmunds ready for final review

@redmunds
Copy link
Contributor

Looks good. Merging.

redmunds added a commit that referenced this pull request Mar 14, 2013
Fixed: #1863 Selector width info is wrong when no space before '{'
@redmunds redmunds merged commit 20fe661 into adobe:master Mar 14, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selector width info is wrong when no space before '{'
2 participants