2013-12-16 8 views
0

방금 ​​Sass로 Foundation 5를 설치했고 나침반을 사용하여 내 스타일 시트를보고 있습니다. 내 사용자 정의 스타일을 추가하는 가장 좋은 방법은 무엇인지 알고 싶었습니다. 나는 이미 custom.scss 파일을 만들었고 @import "custom"을 사용하여이를 참조하고있다. 내 app.scss 파일에.Foundation 5와 Mixins 사용하기

예를 들어 신체의 배경색을 바꾸고 싶다면 믹스 인을 사용하여 어떻게하면 좋을까요? 추가 할 내용 :

$ body-bg : red;

내 custom.scss 파일에 있지만 신체의 배경은 변경되지 않습니다. _settings.scss 파일을 편집해야합니다. 그게 틀린 것처럼 보입니다 ...

내가 뭘 잘못하고 있는지 아는 사람이 있습니까? 미리 감사드립니다! 어쩌면 이러한 구조를 사용 좋을 것이다 귀하의 경우에는

# Require any additional compass plugins here. 
add_import_path "bower_components/foundation/scss" 

# Set this to the root of your project when deployed: 
http_path = "/" 
css_dir = "stylesheets" 
sass_dir = "scss" 
images_dir = "images" 
javascripts_dir = "javascripts" 

# You can select your preferred output style here (can be overridden via the command line): 
# output_style = :expanded or :nested or :compact or :compressed 

# To enable relative paths to assets via compass helper functions. Uncomment: 
# relative_assets = true 

# To disable debugging comments that display the original location of your selectors. Uncomment: 
# line_comments = false 


# If you prefer the indented syntax, you might want to regenerate this 
# project again passing --syntax sass, or you can uncomment this: 
# preferred_syntax = :sass 
# and then run: 
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass 

답변

0

: 여기

내 config.rb의

app.scss :

@import "custom"; //where you define variables for foundation such as $body-bg: red; 
@import "foundation"; 
@import "other styles"; 
+0

그 중 하나가 작동하지 않는 것 같습니다. – realph

+1

config.rb를 게시 할 수 있습니까? –

+0

위의 원래 게시물에 config.rb를 추가했습니다. – realph

0

예,했습니다 언제나 _settings.scss 파일을 편집 한 다음 Araxis Merge 또는 Kaleidoscope와 같은 적절한 파일 비교를 사용하여 업데이트가 만들어지면 새 옵션을 병합합니다. 맞춤 변수가있는 경우이를 설정 파일 상단에 붙여 두어야합니다 (사실 이후에 설정과 전역 항목 모두 적용해야 함).