Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# BitBox Framework

## Introduction

This project is made to create a custom personal framework, which I use in my projects.
Heavily inspired in the Bootstrap framework, it's totally Flex based(even the grid), and
it's free, feel free to fork/clone/modify/etc.

## Why create a Bootstrap related framework instead of only using Bootstrap?

I love Bootstrap but there are some things that I didn't liked it, so I made
more 'speakable', more alike to the English language, so the classes in the tags
looks more like phrases, for example:

```
<div class='minibox border rounded bolder'>
<span> Content </span>
</div>
```

Another thing is that: I love Flex, so I tried to do as 'Flexier' as possible,
making more self-adjustable.

## Built With

- **CSS**
- **SCSS**

## Author

**Henrique Hefler**

- Github: [@Kasuhira](https://github.com/Kasuhira)

## Contributing

Contribution, issues and feature requests are widely welcome!

## Suport

Give a star if you liked this project, and credit if you used it, would be very
supportive to me.
16 changes: 6 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@
</head>
<body>

<div class='box border rounded soft'>
<div class='box-child'>
<span>Text</span>
<span>Text</span>
<span>Text</span>
</div>
<div> Text </div>
<span> Text </span>
<div> Text </div>
<div> Text </div>
<div class='box'>
<div class='minibox'>
<div style="width:400px"> Text </div>
<div style="width:400px"> Text </div>
<div style="width:800px"> Text </div>
<div> Text </div>
</div>
</div>


Expand Down
162 changes: 161 additions & 1 deletion master.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion master.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 70 additions & 0 deletions master.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
@import './reset.css' ;

// Number of Columns
$grid-columns: 12;

$content-padding: 5px;
$content-padding-2: 10px;
$content-padding-3: 15px;
$content-padding-4: 20px;

$content-margin: 5px;
$content-margin-2: 10px;
$content-margin-3: 15px;
$content-margin-4: 20px;
//grid gap
:root {
--grid-gap: 10px;
}
// Margins
$margin: 1rem ;
$margin-s: 2rem ;
Expand Down Expand Up @@ -53,6 +69,37 @@


// Patterns

// Grid System Logic
//flex container definition

.flex-grid {
display: flex;
flex-wrap: wrap;
margin: calc(var(--grid-gap) * -1) 0 0 calc(var(--grid-gap) * -1);
}

.col {
box-sizing: border-box;
background-clip: content-box;
flex-basis: 100%;
}

//round flex items' width
@function round-width($i) {
$width: floor(100 * $i * 100 / $grid-columns) / 100;
@return $width#{"%"};
}

//utility classes

@for $i from 1 through $grid-columns {
.col-#{$i} {
flex-basis: round-width($i);
max-width: round-width($i);
}
}

html{
font-size: $text-mobile;

Expand Down Expand Up @@ -95,6 +142,8 @@ html{
.minibox {
display: flex ;
width: 100% ;
flex-wrap: wrap;
margin: calc(var(--grid-gap) * -1) 0 0 calc(var(--grid-gap) * -1);

@media screen and (max-width: $breakpoint-phone) {
margin: auto ;
Expand Down Expand Up @@ -223,3 +272,24 @@ html{
background: $color-primary;
color: $color-opposite ;
}


@media only screen and (min-width: 768px) {
@for $i from 1 through $grid-columns {
.col-m-#{$i} {
flex-basis: round-width($i);
max-width: round-width($i);
}
}

}

@media only screen and (min-width: 1024px) {
@for $i from 1 through $grid-columns {
.col-l-#{$i} {
flex-basis: round-width($i);
max-width: round-width($i);
}
}

}