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.

            
              <div class="dialogo">
  <p class="mensaje">His audiam deserunt in, eum ubique voluptatibus te. In reque dicta usu. Ne rebum dissentiet eam, vim omnis deseruisse id. Ullum deleniti vituperata at quo, insolens complectitur te eos, ea pri dico munere propriae. Vel ferri facilis ut, qui paulo ridens praesent ad. Possim alterum qui cu. Accusamus consulatu ius te, cu decore soleat appareat usu.</p>
  <div class="botones">
    <button class="botonAceptar">Aceptar</button>
    <button class="botonCancelar">Cancelar</button>
  </div>
</div>
            
          
!
            
              // Variables
@okColor: #3c3;
@errorColor: #f22;
@anchoBotones: 120px; //@anchoBotones: 70px;

// Mixins
.contenedor(@colorBorde; @colorFondo) {
  border: 2px solid darken(@colorBorde, 40%);
  border-radius: 5px;
  width: 50%;
  margin: 50px auto;
  padding: 10px 20px;
  background: @colorFondo;
  .mensaje {
    text-align: center;
    color: #aaa;
  }
}


// Contenedor con botones de confirmacion
.contenedor(@colorBorde; @colorFondo; @tipo) when (@tipo = confirmacion) {
  .contenedor(@colorBorde; @colorFondo);
  .botones {
    text-align: center;
    margin: 30px auto 10px;
  }
}

// Contenedor sin botones de confirmacion
.contenedor(@colorBorde; @colorFondo; @tipo) when not (@tipo = confirmacion) {
  .contenedor(@colorBorde; @colorFondo);
  .botones {
    display: none;
  }
}

.boton(@color; @ancho: 100px) {
  margin: 5px;
  width: @ancho;
  // Si el ancho del boton es mayor de 100px se le aplica el padding 
  & when (@ancho > 100px) {
    padding: 10px 20px;
  }
  
  & when (@ancho < 100px) {
    padding: 5px 10px;
  }
  
  border-radius: 5px;
  background: linear-gradient(@color, darken(@color, 40%));
  color: contrast(darken(@color, 40%));
  border: 2px solid darken(@color, 40%);
  
  &:hover {
    background: linear-gradient(45deg, @color, darken(@color, 40%));
  }
}


// Estilos finales
body {
  background: rgb(29, 31, 32);  
}

.dialogo {
  //.contenedor(@errorColor; #111; aviso);
  .contenedor(@errorColor; #111; confirmacion);
  
  .botonAceptar {
    .boton(@okColor; @anchoBotones);
  }

  .botonCancelar {
    .boton(@errorColor; @anchoBotones);
  }
}
            
          
!
999px
Loading ..................

Console