Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base structure #172

Open
rustam87 opened this issue Dec 26, 2017 · 2 comments
Open

Base structure #172

rustam87 opened this issue Dec 26, 2017 · 2 comments

Comments

@rustam87
Copy link

rustam87 commented Dec 26, 2017

Man, please create base structure of baron and add to tutorial.
I have been workiing with baron already two hours and dont understanding how it works.
For example
HTML

<div class="baron">
        <div class="baron__scroller"></div>
</div>

bla bla bla
CSS

.baron{}
.baron_scroller{}

bla bla bla

only rules that real needing for initialize baron

JS

baron({
   scroller: ''
});

only options that real needing for initialize baron

Thanks

@Safe-Mode
Copy link

Same stuff for me)

@rustam87
Copy link
Author

rustam87 commented Feb 25, 2018

HTML

 <div id="baron_1" class="baron baron__root baron__clipper _simple">
  <div class="baron__scroller">
      // Your content
  </div>
  <div class="baron__track">
          <div class="baron__bar"></div>
  </div>
 </div>

CSS
you need @import "~baron/skins/styles.css" and select one of 3 classes(for example baron__clipper _simple like this) and your element(in this example element with id=#baron_1 must have a height, for example 300px

JS

baron({
     scroller: `#baron_1`,
     track: `.baron__track`,
     bar: `.baron__bar`
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants