처음으로 버번을 사용하고 있는데, 예상대로 작동하지 않습니다. 아마도 잘못된 것을 설정했을 것입니다.부르봉 왕가가 내 모바일 우선 설정에서 예상대로 작동하지 않습니다.
저는 모바일 우선을 개발 중이므로 레이아웃이 내 바탕 화면 중단 점과 큰 중단 점 사이에서 동일하게 유지 될 것으로 기대합니다 (스타일이 다음 중단 점까지 계단식으로 배치되도록). 그러나 더 큰 중단 점에서 스타일을 다시 재정의하지 않으면 내 레이아웃이 모바일 레이아웃으로 돌아갑니다.
// Neat Overrides
$grid-columns: 4;
$max-width: 90%;
// Breakpoints
$first-breakpoint-value: 641px;
$second-breakpoint-value: 1024px;
$third-breakpoint-value: 1440px;
$fourth-breakpoint-value: 1920px;
$tablet: new-breakpoint(min-width em($first-breakpoint-value) max-width em($second-breakpoint-value) 8);
$desktop: new-breakpoint(min-width em($second-breakpoint-value + 1) max-width em($third-breakpoint-value) 12);
$large: new-breakpoint(min-width em($third-breakpoint-value + 1) max-width em($fourth-breakpoint-value) 12);
$xlarge: new-breakpoint(min-width em($fourth-breakpoint-value +1) 12);
그런 다음 내 요소는 다음과 같습니다
:.container {
@include outer-container;
.swatch {
// mobile styles (here my swatch has a width of 100%)
border: 1px solid #000;
text-align: center;
margin-bottom: $gutter;
//MEDIA QUERIES
@include media($tablet) {
@include span-columns(4);
@include omega(2n);
}
@include media($desktop) {
@include span-columns(3);
@include omega(4n);
padding: 2em -0px;
}
@include media($large) { }
@include media($xlarge) { }
}
}
가 지금은 스타일을 기다리고 있었다 여기
내가 내 기본/_grid-settings.scss 내 중단 점을 정의한 방법입니다 내 $desktop
미디어 쿼리가 모두 $xlarge
미디어 쿼리까지 캐스케이드 처리되지만 현재 .swatch
요소는 $large
및 $xlarge
에있는 부모 컨테이너의 100 %로 다시 돌아갑니다 중단 점. 내가 잘못 했나요? 스타일을 계단식으로 배열하려면 모든 중단 점에 대해 동일한 코드를 반복해서 반복하지 않아야합니다.
는 미디어 쿼리 만 분의 폭을 정의합니다. 그렇지 않으면 화면 크기가 쿼리를 초과 할 때 이러한 선언이 사라집니다. – nickspiel