Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngHide documentation could use a little whitespace #10101

Closed
LegalizeAdulthood opened this issue Nov 17, 2014 · 8 comments
Closed

ngHide documentation could use a little whitespace #10101

LegalizeAdulthood opened this issue Nov 17, 2014 · 8 comments

Comments

@LegalizeAdulthood
Copy link
Contributor

ngHide shows a CSS block withallthewhitespaceremoved:

.ng-hide {
/* this is just another form of hiding an element */
display:block!important;
position:absolute;
top:-9999px;
left:-9999px;
}

With minification tools readily available, we should be writing CSS examples for readability, not for minimization:

.ng-hide {
  /* this is just another form of hiding an element */
  display: block !important;
  position: absolute;
  top: -9999px;
  left: -9999px;
}

There is another block that looks like this:

.my-element.ng-hide-add, .my-element.ng-hide-remove {
  transition:0.5s linear all;
}

which I suggest would read better as:

.my-element.ng-hide-add, .my-element.ng-hide-remove {
  transition: 0.5s linear all;
}
@pkozlowski-opensource
Copy link
Member

Hmm, the indentation spaces are somehow getting lost in the markdown -> HTML conversion process as it looks alright in the source code:

* ```css
* .ng-hide {
* /* this is just another form of hiding an element */
* display:block!important;
* position:absolute;
* top:-9999px;
* left:-9999px;
* }
* ```

@petebacondarwin do you remember, from to of your head, which part of the doc generation pipeline is responsible for this conversion?

@petebacondarwin
Copy link
Contributor

No it doesn't look alright. There is no whitespace in the source

@pkozlowski-opensource
Copy link
Member

@petebacondarwin are we talking about the same white-spaces? I meant the ones responsible for indentation, like this one:

* display:block!important;

@petebacondarwin
Copy link
Contributor

@pkozlowski-opensource - right I see now. I thought you meant the lack of space between the words, rather than the indentation. This is a bug in dgeni. I'll fix it.

petebacondarwin added a commit to angular/dgeni-packages that referenced this issue Nov 18, 2014
… kill the indentation

Previously we were trying to be clever and guess that lines that had zero indentation were actually
just rolling over from the previous line and so were ignored.

But since we ignore the first line if it has no indentation, we had to rely on the second line having
no indentation for the zero indentation to be set. If the second line had indentation then all future
zero indentation lines were being ignored.

This change now never ignores zero indent lines and so will indent most things properly. If a line is
rolling over then it should be indented to the minimum level already for it to be displayed correctly.

See angular/angular.js#10101
@petebacondarwin
Copy link
Contributor

Also a problem in ngCloak: https://docs.angularjs.org/api/ng/directive/ngCloak

@LegalizeAdulthood
Copy link
Contributor Author

Now it has indentation, but if you look at what I suggested, it was more than indentation, but also whitespace after the CSS attribute names. It is still missing that.

@petebacondarwin
Copy link
Contributor

That is a simple change in the src code.

@petebacondarwin
Copy link
Contributor

Fixed in 16c8f29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants