cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <p class="first-paragraph">Most of us don’t need a robust permission handling in our application. What do we mean under simple role management? Basically that, you have a team, the team has an owner and some members.</p>

<p class="second-paragraph">We want to determine who is the owner, who has a bit more rights in the team and who is a basic member with the basic permissions.</p>

<div>
    <p class="third-paragraph">In code, that means we have a User model, a Team model and a pivot table that establishes the connection between the two models.</p>
    <p>Since, most of the time this structure is present, it’s time to roll out a simple solution for handling roles that stored in the pivot table.</p>
</div>
            
          
!
            
              :root {
    box-sizing: border-box;
}

*,
::before,
::after {
    box-sizing: inherit;
}

body {
    font-family: 'Lato', sans-serif;
    padding: 40px;
    font-size: 120%;
    line-height: 1.5;
    color: #565656;
}

p {
    position: relative;
    margin: 20px 0;
    
    // margin-top display helper
    &::before {
        content: 'margin-top';
        color: rgba(0,0,0,0.4);
        font-size: 14px;
        position: absolute;
        top: -20px;
        right: 0;
        left: 0;
        background: rgba(167, 63, 188, 0.2);
        display: block;
        height: 20px;
        line-height: 20px;
        padding: 0 10px;
    }
    
    // margin-bottom display helper
    &::after {
        content: 'margin-bottom';
        color: rgba(0,0,0,0.4);
        font-size: 14px;
        position: absolute;
        bottom: -20px;
        right: 0;
        left: 0;
        background: rgba(63, 188, 162, 0.3);
        display: block;
        height: 20px;
        line-height: 20px;
        padding: 0 10px;
        text-align: right;
    }
}

.first-paragraph {
    margin-bottom: 40px;
    
    // margin-bottom display helper
    &::after {
        height: 40px;
        line-height: 40px;
        bottom: -40px;
    }
}

.second-paragraph {
    margin-top: 30px;
    
    // margin-top display helper
    &::before {
        height: 30px;
        line-height: 30px;
        top: -30px;
    }
}

.third-paragraph {
    margin-top: 60px;
    
    // margin-top display helper
    &::before {
        height: 60px;
        line-height: 60px;
        top: -60px;
    }
}

div {
    background: rgba(255, 255, 0, 0.15);
}
            
          
!
999px
Loading ..................

Console