Deprecated: Twig\Parser::addImportedSymbol(): Implicitly marking parameter $node as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Parser.php on line 274

Deprecated: Twig\NodeVisitor\SafeAnalysisNodeVisitor::intersectSafe(): Implicitly marking parameter $a as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php on line 137

Deprecated: Twig\NodeVisitor\SafeAnalysisNodeVisitor::intersectSafe(): Implicitly marking parameter $b as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php on line 137

Deprecated: Twig\TokenStream::__construct(): Implicitly marking parameter $source as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/TokenStream.php on line 28

Deprecated: Twig\TokenStream::expect(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/TokenStream.php on line 71

Deprecated: Twig\Node\Expression\ArrayExpression::addElement(): Implicitly marking parameter $key as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/Expression/ArrayExpression.php on line 59

Deprecated: Twig\Node\SetNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/SetNode.php on line 24

Deprecated: Twig\Node\IfNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/IfNode.php on line 24

Deprecated: Twig\Node\BlockNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/BlockNode.php on line 24

Deprecated: Twig\Node\IncludeNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/IncludeNode.php on line 25

Deprecated: Twig\Node\ForNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/ForNode.php on line 28

Deprecated: Twig\Node\ForLoopNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/ForLoopNode.php on line 23

Deprecated: Twig\Node\BlockReferenceNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/BlockReferenceNode.php on line 24

Deprecated: Twig\Node\EmbedNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/EmbedNode.php on line 26

Deprecated: Twig\Node\PrintNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/PrintNode.php on line 25

Deprecated: Twig\Node\Expression\FilterExpression::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/Expression/FilterExpression.php on line 20

Deprecated: Twig\Node\DoNode::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/DoNode.php on line 24
Blog | Matthew Miner's Blog

Matthew Miner's Basic-ish BlogMatthew Miner's Blog

Sometimes I might say something

Deprecated: Twig\Node\Expression\Filter\DefaultFilter::__construct(): Implicitly marking parameter $tag as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php on line 32

If you're new to Google AdSense, you're probably quite excited about the prospect of making money from your blogging or web development efforts, but you're also likely a bit confused at the opacity of the situation. Like namely, what do users have to do for Google to pay me? Do they just have to view the page or do they have to actually click an ad? What if they have an adblocker on?

Well, the answer is either. It depends. Google actually has an auction for advertisers where they can pay for e...

Continue Reading…

How to Scope CSS by Moving an Element to the Shadow DOM

PROGRAMMING WEB DEVELOPMENT HTML CSS JAVASCRIPT SHADOW DOM TECH
Bakura demonstrating how to banish things to the shadow DOM in Yu-Gi-Oh!

(tl;dr: Jump to the actual moving)

Scope is an important concept in programming. It allows you to just write small sections of code to do what you need them to do without having to worry about something else in your code using the same name and messing everything up. Declarations (such as of variables or functions) will only be visible to code also in the same scope, usually some block of code.

MDN has a good example of the effects of scope in Javascript:

let x = 1;
if (x === 1) {...

Continue Reading…