|
266 | 266 | it { should_not report_lint }
|
267 | 267 | end
|
268 | 268 |
|
| 269 | + context 'when the colon after a property is followed by multiple spaces' do |
| 270 | + let(:scss) { <<-SCSS } |
| 271 | + p { |
| 272 | + margin: bold; |
| 273 | + } |
| 274 | + SCSS |
| 275 | + |
| 276 | + it { should report_lint line: 2 } |
| 277 | + end |
| 278 | + |
269 | 279 | context 'when the colon after a property is followed by a newline and spaces' do
|
270 | 280 | let(:scss) { <<-SCSS }
|
271 | 281 | p {
|
|
300 | 310 | end
|
301 | 311 | end
|
302 | 312 |
|
| 313 | + context 'when at least one space or newline is preferred' do |
| 314 | + let(:style) { 'at_least_one_space_or_newline' } |
| 315 | + |
| 316 | + context 'when the colon after a property is not followed by space' do |
| 317 | + let(:scss) { <<-SCSS } |
| 318 | + p { |
| 319 | + margin:0; |
| 320 | + } |
| 321 | + SCSS |
| 322 | + |
| 323 | + it { should report_lint line: 2 } |
| 324 | + end |
| 325 | + |
| 326 | + context 'when the colon after a property is followed by a space' do |
| 327 | + let(:scss) { <<-SCSS } |
| 328 | + p { |
| 329 | + margin: 0; |
| 330 | + } |
| 331 | + SCSS |
| 332 | + |
| 333 | + it { should_not report_lint } |
| 334 | + end |
| 335 | + |
| 336 | + context 'when the colon after a property is surrounded by spaces' do |
| 337 | + let(:scss) { <<-SCSS } |
| 338 | + p { |
| 339 | + margin : bold; |
| 340 | + } |
| 341 | + SCSS |
| 342 | + |
| 343 | + it { should_not report_lint } |
| 344 | + end |
| 345 | + |
| 346 | + context 'when the colon after a property is followed by multiple spaces' do |
| 347 | + let(:scss) { <<-SCSS } |
| 348 | + p { |
| 349 | + margin: bold; |
| 350 | + } |
| 351 | + SCSS |
| 352 | + |
| 353 | + it { should_not report_lint } |
| 354 | + end |
| 355 | + |
| 356 | + context 'when the colon after a property is followed by multiple spaces and a tab' do |
| 357 | + let(:scss) { <<-SCSS } |
| 358 | + p { |
| 359 | + margin: \tbold; |
| 360 | + } |
| 361 | + SCSS |
| 362 | + |
| 363 | + it { should report_lint line: 2 } |
| 364 | + end |
| 365 | + |
| 366 | + context 'when the colon after a property is followed by a newline and spaces' do |
| 367 | + let(:scss) { <<-SCSS } |
| 368 | + p { |
| 369 | + background-image: |
| 370 | + url(https://something.crazy.long/with/paths?and=queries) |
| 371 | + } |
| 372 | + SCSS |
| 373 | + |
| 374 | + it { should_not report_lint } |
| 375 | + end |
| 376 | + |
| 377 | + context 'when the colon after a property is followed by a newline and no spaces' do |
| 378 | + let(:scss) { <<-SCSS } |
| 379 | + p { |
| 380 | + background-image: |
| 381 | +url(https://something.crazy.long/with/paths?and=queries) |
| 382 | + } |
| 383 | + SCSS |
| 384 | + |
| 385 | + it { should_not report_lint } |
| 386 | + end |
| 387 | + |
| 388 | + context 'when the colon after a property is followed by a space and then a newline' do |
| 389 | + let(:scss) { <<-SCSS } |
| 390 | + p { |
| 391 | + background-image:\s |
| 392 | +url(https://something.crazy.long/with/paths?and=queries) |
| 393 | + } |
| 394 | + SCSS |
| 395 | + |
| 396 | + it { should report_lint line: 2 } |
| 397 | + end |
| 398 | + end |
| 399 | + |
303 | 400 | context 'when aligned property values are preferred' do
|
304 | 401 | let(:style) { 'aligned' }
|
305 | 402 |
|
|
0 commit comments