Project: aptanastudio
Issue APSTUD-4107: CSS Formatter does not place an 'At-Rule' in a new line (like @media)
The CSS formatter is handling the @media rule correctly for trailing spaces after rule, however if there is a rule before an @media rule the formatter acts as if there is an end of file after the antecedent rule : try formatting : "h1{}p{}@media print{}h2{}@media screen{}@media print, screen{}h3{}h4{}". By doing so you will also notice the formatter does not apply the configured number of lines after a rule if that rule is at the end of the file. Steps to Replicate : 1) Open Aptana Studio 2) Open an empty CSS file 3) Open Preferences > Aptana Studio > Formatter > CSS > Blank Lines and set Lines After CSS Rule to a non-zero value 4) Type "h1{}p{}@media print{}h2{}@media screen{}@media print, screen{}h3{}h4{}" 5) Select Source > Format Actual Results : The formatter does not add the selected number of lines after a rule prior to an @media rule. Expected Results : The formatter should add the selected number of lines after all rules.
Story points: 8