Giter Club home page Giter Club logo

sass's Introduction

sass 사용 거의 안함, scss를 사용 (사스라고 읽음)

image


scss 컴파일

image


css 위치변경

image


savePath:null이면 scss파일과 같은 위치에 style.css가 생김

image


'~'은 style.scss를 의미, '/'는 style.scss가 있는 폴더

image


scss파일이 있는 폴더의 상위요소에 생성

image


주석처리방법

// : 라인주석처리는 css로 컴파일 되지 않는다

/* */ : 블록 주석처리는 css로 컴파일 됨

image


변수만들기 : $로 시작(영문, 숫자, -,_)만 사용가능

image image


Partials

  • Partials 의 파일명은 _ 로 시작하며
  • 불러들일때는 @import '파일명' 이때 파일명에 _ 는 포함시키지 않고, 확장명도 포함시키지 않는다.
  • Scc는 _ 로 시작하는 파일은 컴파일 하지 않는다
  • image

@import --> 변수가 중복될때는 아래의것이 적용된다

image


@use --> 변수이름이 같을 때 에러발생, @use를 사용할때는 앞에 파일명을 추가해서 "파일명.변수명"

image


as 뒤에 별명을 붙여서 사용할 수 있다

image


@forward는 각각의 파셜들을 하나로 묶어줌 style.scss에서는 _index.scss 를 호출하여 사용함

image


*: 와일드카드를 붙이면 이름을 생략할 수 있음

image


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.