CSS
Cool tricks with CSS.
Margin breaks component encapsulation because components impact
everything surrounding them and external to them. It also makes reusability
difficult and impacts external components. The stack component, similar to other
spacer components, is useful for adding arbitrary spaces internal to and
external from different components. THese help define discrete units for space
as well which can be standardized across the application.
CSS can do a lot more than we use it for: it can [count]
, for one.
[saizai/cssfingerprint: a research project to see how well the CSS history hack
can fingerprint a user]
In this code segment, it's trivial to hide the truth of the text
that's being copied, thus resulting in a blind paste into terminal being
malicious:
One way the author recommends safe pasting is via this command:
This opens the line pasted in vim before sending it to the browser,
encouraging you to preview and edit it.
[Ten modern layouts
in one line of CSS]
transform() operations occur outside of the flexbox algorithm, so things
can be displayed with flexbox then instantly transformed to their proper
position as desired. This also allows us to place an element entirely out of the
document flow! (adding a 'close' button, for example).
Convention
Don't use Margin
Computation
Vulnerabilities
Do not blindly copy paste
<style>
span {
font-family: monospace;
position: absolute;
color: white;
cursor: text;
}
span::selection {
background: #accef7;
color: #accef7;
}
span::before {
content: "clip";
position: absolute;
color: black;
}
</style>
<span>silly</span>
alias prepaste='builtin fc -e "vim -c %d -c \"set paste\""'
Alignment tricks!
Transform