- position: relative on the element establishes a Cartesian positioning context for psuedo-elements.
- z-index: 1 establishes a new stacking context.
- ::after defines a pseudo-element.
- position: absolute takes the pseudo element out of the flow of the document and positions it in relation to the parent.
- width: 100% and height: 100% sizes the pseudo-element to fill its parent's dimensions, making it equal in size.
- background: inherit causes the pseudo-element to inherit the linear gradient specified on the element.
- top: 0.5rem offsets the pseudo-element down slightly from its parent.
- filter: blur(0.4rem) will blur the pseudo-element to create the appearance of a shadow underneath.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div>{{ asyncText }}</div> | |
</template> | |
<script> | |
export default { | |
data: () => ({ | |
asyncText: 'Mi componente' | |
}), | |
// Usamos el mounted como punto de inicio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.highligth { | |
color: red; | |
} | |
.grid-container { | |
display: grid; | |
grid-template-columns: minmax(0, auto) minmax(0, auto) minmax(0, auto); | |
grid-template-rows: minmax(0, auto); | |
grid-gap: 0 1rem; | |
border: 2px solid black; | |
} |
Functional programming is a paradigm in which programs are built in a declarative manner using pure functions that avoid shared state and mutable data. Functions that always return the same value for the same input and don't produce side effects are the pillar of functional programming. Many programmers consider this to be the best approach to software development as it reduces bugs and cognitive load.
- Cleaner, more concise development experience
- Simple function composition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const RGBToHex = (r, g, b) => ((r << 16) + (g << 8) + b).toString(16).padStart(6, '0'); | |
RGBToHex(255, 165, 1); // 'ffa501' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def capitalize(string, lower_rest=True): | |
return string[:1].upper() + (string[1:].lower() if lower_rest else string[1:]) | |
capitalize('fooBar') # 'Foobar' | |
capitalize('fooBar', False) # 'FooBar' |