Compare commits
4 Commits
master
...
split-manu
Author | SHA1 | Date |
---|---|---|
Dustin Wilson | 605b54689f | 3 years ago |
Dustin Wilson | 1b4a0c387c | 3 years ago |
Dustin Wilson | d3a8a45a70 | 3 years ago |
Dustin Wilson | 9968cdfe79 | 3 years ago |
50 changed files with 62 additions and 4667 deletions
@ -0,0 +1,3 @@ |
|||
[submodule "docs"] |
|||
path = docs |
|||
url = https://code.mensbeam.com/MensBeam/HTML-manual.git |
File diff suppressed because it is too large
@ -1,15 +0,0 @@ |
|||
{ |
|||
"title": "HTML", |
|||
"tagline": "Tools for parsing and printing HTML5 documents and fragments.", |
|||
"author": "Dustin Wilson", |
|||
"languages": { |
|||
"en": "English" |
|||
}, |
|||
"themes_directory": "docs/theme", |
|||
"html": { |
|||
"theme":"php", |
|||
"float": false, |
|||
"toggle_code": false, |
|||
"search": false |
|||
} |
|||
} |
@ -1 +0,0 @@ |
|||
HTML is a library which provides tools for parsing and printing of HTML5 documents and fragments. Unlike PHP's DOM and other similar libraries the goal of the project is to parse HTML as accurate to the specification as possible given the limitations of PHP's DOM and of the uses of the library. Therefore, there is no scripting in this implementation, and there likely never will be. |
@ -1,8 +0,0 @@ |
|||
We try to make the installation of the MensBeam HTML library as easy and straightforward as possible. |
|||
|
|||
## Requirements ## |
|||
|
|||
HTML intentionally has few requirements. It only requires PHP 7.1.0 or later with the [dom](http://php.net/manual/en/book.dom.php) extension installed. It is recommended to install the [ctype](https://www.php.net/manual/en/book.ctype.php) extension for performance improvements, but it is not required. |
|||
|
|||
TODO: Add Installation instructions once there are releases and a package is available on Packagist. |
|||
|
@ -1,63 +0,0 @@ |
|||
--- |
|||
title: Comment |
|||
--- |
|||
|
|||
# The Comment Class # |
|||
|
|||
## Introduction ## |
|||
|
|||
<div class="admonition info"><p><strong>Info</strong> Only new methods and methods which make outward-facing changes from <a href="https://www.php.net/manual/en/class.domcomment.php">\DOMComment</a> will be documented here, otherwise they will be linked back to PHP's documentation.</p></div> |
|||
|
|||
## Class Synopsis ## |
|||
|
|||
<pre><code class="php">MensBeam\HTML\Comment extends <a href="https://www.php.net/manual/en/class.domcomment.php">\DOMComment</a> { |
|||
|
|||
use <a href="../LeafNode/index.html">LeafNode</a>, <a href="../Moonwalk/index.html">Moonwalk</a>; |
|||
|
|||
/* Inherited properties */ |
|||
public string <a href="https://www.php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.data">$data</a> ; |
|||
public readonly int <a href="https://www.php.net/manual/en/class.domcharacterdata.php#domcharacterdata.props.length">$length</a> ; |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodename">$nodeName</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodevalue">$nodeValue</a> ; |
|||
public readonly int <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodetype">$nodeType</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.parentnode">$parentNode</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.childnodes">$childNodes</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.firstchild">$firstChild</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.lastchild">$lastChild</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.previoussibling">$previousSibling</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nextsibling">$nextSibling</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnamednodemap.php">\DOMNamedNodeMap</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.attributes">$attributes</a> ; |
|||
public readonly Document|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.ownerdocument">$ownerDocument</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.namespaceuri">$namespaceURI</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.prefix">$prefix</a> ; |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.localname">$localName</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.baseuri">$baseURI</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent">$textContent</a> ; |
|||
|
|||
/* Trait Methods */ |
|||
public <a href="../LeafNode/appendChild.html">LeafNode::appendChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node ) : DOMException; |
|||
public <a href="../Node/C14N.html">Node::C14N</a> ( bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../Node/C14NFile.html">Node::C14NFile</a> ( string $uri , bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../LeafNode/insertBefore.html">LeafNode::insertBefore</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $child = null ) : DOMException |
|||
public <a href="../Moonwalk/moonwalk.html">Moonwalk::moonwalk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
public <a href="../LeafNode/removeChild.html">LeafNode::removeChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : DOMException |
|||
public <a href="../LeafNode/replaceChild.html">LeafNode::replaceChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : DOMException |
|||
|
|||
/* Magic Methods */ |
|||
public __toString() : string |
|||
|
|||
/* Inherited Methods */ |
|||
public <a href="https://www.php.net/manual/en/domcomment.construct.php">__construct</a> ( string $data = "" ) |
|||
public <a href="https://www.php.net/manual/en/domnode.clonenode.php">\DOMNode::cloneNode</a> ( bool $deep = false ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domnode.getlineno.php">\DOMNode::getLineNo</a> ( ) : int |
|||
public <a href="https://www.php.net/manual/en/domnode.getnodepath.php">\DOMNode::getNodePath</a> ( ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domnode.hasattributes.php">\DOMNode::hasAttributes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.haschildnodes.php">\DOMNode::hasChildNodes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.isdefaultnamespace.php">\DOMNode::isDefaultNamespace</a> ( string $namespace ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issamenode.php">\DOMNode::isSameNode</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $otherNode ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issupported.php">\DOMNode::isSupported</a> ( string $feature , string $version ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupnamespaceuri.php">\DOMNode::lookupNamespaceUri</a> ( string $prefix ) : string |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupprefix.php">\DOMNode::lookupPrefix</a> ( string $namespace ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domnode.normalize.php">\DOMNode::normalize</a> ( ) : void |
|||
|
|||
}</code></pre> |
@ -1,28 +0,0 @@ |
|||
--- |
|||
title: Document::__construct |
|||
--- |
|||
|
|||
Document::__construct — Creates a new Document object |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::__construct ( ) |
|||
``` |
|||
|
|||
Creates a new Document object. |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Creating a new Document** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
echo $dom; |
|||
|
|||
?> |
|||
``` |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Document::createEntityReference |
|||
--- |
|||
|
|||
Document::createEntityReference — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::createEntityReference ( string $name ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. Documented to show difference from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php). DOM4 does not have entity references or entity nodes. |
@ -1,46 +0,0 @@ |
|||
--- |
|||
title: Document::load |
|||
--- |
|||
|
|||
Document::load — Load HTML from a file |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::load ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool |
|||
``` |
|||
|
|||
Loads an HTML document from a file. |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>filename</code></dt> |
|||
<dd>The path to the HTML document.</dd> |
|||
|
|||
<dt><code>options</code></dt> |
|||
<dd>Always <code>null</code>. Was used for option constants in <a href="https://www.php.net/manual/en/class.domdocument.php"><code>\DOMDocument</code></a>.</dd> |
|||
|
|||
<dt><code>encodingOrContentType</code></dt> |
|||
<dd>The encoding of the document that is being loaded. If not specified it will be determined automatically.</dd> |
|||
</dl> |
|||
|
|||
## Return Values ## |
|||
|
|||
Returns <code>true</code> on success or <code>false</code> on failure. |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Creating a Document** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->load('ook.html'); |
|||
echo $dom; |
|||
|
|||
?> |
|||
``` |
@ -1,46 +0,0 @@ |
|||
--- |
|||
title: Document::loadHTML |
|||
--- |
|||
|
|||
Document::loadHTML — Load HTML from a string |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::loadHTML ( string $source , null $options = null , string|null $encodingOrContentType = null ) : bool |
|||
``` |
|||
|
|||
The function parses the HTML contained in the string <var>source</var>. |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>source</code></dt> |
|||
<dd>The HTML string.</dd> |
|||
|
|||
<dt><code>options</code></dt> |
|||
<dd>Always <code>null</code>. Was used for option constants in <a href="https://www.php.net/manual/en/class.domdocument.php"><code>\DOMDocument</code></a>.</dd> |
|||
|
|||
<dt><code>encodingOrContentType</code></dt> |
|||
<dd>The encoding of the document that is being loaded. If not specified it will be determined automatically.</dd> |
|||
</dl> |
|||
|
|||
## Return Values ## |
|||
|
|||
Returns <code>true</code> on success or <code>false</code> on failure. |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Creating a Document** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->loadHTML('<!DOCTYPE html><html><head><title>Ook!</title></head><body><h1>Eek</h1></body></html>'); |
|||
echo $dom; |
|||
|
|||
?> |
|||
``` |
@ -1,9 +0,0 @@ |
|||
--- |
|||
title: Document::loadHTMLFile |
|||
--- |
|||
|
|||
Document::loadHTMLFile — Alias of <a href="Document_load.html"><code>Document::load()</code></a> |
|||
|
|||
## Description ## |
|||
|
|||
This function is an alias of <a href="Document_load.html"><code>Document::load()</code></a>. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Document::loadXML |
|||
--- |
|||
|
|||
Document::loadXML — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::loadXML ( string $source , null $options = null ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. Documented to show difference from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php). |
@ -1,43 +0,0 @@ |
|||
--- |
|||
title: Document::save |
|||
--- |
|||
|
|||
Document::save — Serializes the DOM tree into a file |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::save ( string $filename , null $options = null ) : int|false |
|||
``` |
|||
|
|||
Creates an HTML document from the DOM representation. |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>filename</code></dt> |
|||
<dd>The path to the saved HTML document</dd> |
|||
|
|||
<dt><code>options</code></dt> |
|||
<dd>Always <code>null</code>. Was used for option constants in <a href="https://www.php.net/manual/en/class.domdocument.php"><code>\DOMDocument</code></a>.</dd> |
|||
</dl> |
|||
|
|||
## Return Values ## |
|||
|
|||
Returns the number of bytes written or <code>false</code> on failure. |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Saving a DOM tree into a file** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->loadHTML('<!DOCTYPE html><html><head><title>Ook!</title></head><body><h1>Eek</h1></body></html>'); |
|||
echo 'Wrote: ' . $dom->save('/tmp/test.html') . ' bytes'; // Wrote: 85 bytes |
|||
|
|||
?> |
|||
``` |
@ -1,9 +0,0 @@ |
|||
--- |
|||
title: Document::saveHTMLFile |
|||
--- |
|||
|
|||
Document::saveHTMLFile — Alias of <a href="Document_save.html"><code>Document::save()</code></a> |
|||
|
|||
## Description ## |
|||
|
|||
This function is an alias of <a href="Document_save.html"><code>Document::save()</code></a>. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Document::saveXML |
|||
--- |
|||
|
|||
Document::saveXML — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::saveXML ( DOMNode|null $node = null , null $options = null ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. Documented to show difference from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php). |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Document::validate |
|||
--- |
|||
|
|||
Document::validate — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::validate ( ) : true |
|||
``` |
|||
|
|||
This function has been disabled and will always return `true`. Documented to show difference from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php). |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Document::xinclude |
|||
--- |
|||
|
|||
Document::xinclude — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Document::xinclude ( null $options = null ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. Documented to show difference from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php). |
@ -1,147 +0,0 @@ |
|||
--- |
|||
title: Document |
|||
--- |
|||
|
|||
# The Document Class # |
|||
|
|||
## Introduction ## |
|||
|
|||
Represents an entire HTML document; serves as the root of the document tree. Unlike the PHP [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php) class in which it inherits from it cannot be used to represent an XML document. It is strictly used to represent HTML. |
|||
|
|||
<div class="admonition"><p><strong>Note:</strong> Only new methods and methods which make outward-facing changes from <a href="https://www.php.net/manual/en/class.domdocument.php">\DOMDocument</a> will be documented here, otherwise they will be linked back to PHP's documentation.</p></div> |
|||
|
|||
## Class Synopsis ## |
|||
|
|||
<pre><code class="php">MensBeam\HTML\Document extends <a href="https://www.php.net/manual/en/class.domdocument.php">\DOMDocument</a> { |
|||
|
|||
use <a href="../ContainerNode/index.html">ContainerNode</a>, <a href="../Walk/index.html">Walk</a>; |
|||
|
|||
/* Constants */ |
|||
public const NO_QUIRKS_MODE = 0 ; |
|||
public const QUIRKS_MODE = 1 ; |
|||
public const LIMITED_QUIRKS_MODE = 2 ; |
|||
|
|||
/* Properties */ |
|||
public <a href="../Element/index.html">Element</a>|null <a href="#document-props-body">$body</a> = null ; |
|||
public string|null <a href="#document-props-documentencoding">$documentEncoding</a> = null ; |
|||
public int <a href="#document-props-quirksmode">$quirksMode</a> = 0 ; |
|||
|
|||
/* Inherited properties */ |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnamednodemap.php">\DOMNamedNodeMap</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.attributes">$attributes</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.baseuri">$baseURI</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.childnodes">$childNodes</a> ; |
|||
public readonly DocumentType <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.doctype">$doctype</a> ; |
|||
public readonly Element <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.documentelement">$documentElement</a> ; |
|||
public string|null <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.documenturi">$documentURI</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.firstchild">$firstChild</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domimplementation.php">\DOMImplementation</a> <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.implementation">$implementation</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.lastchild">$lastChild</a> ; |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.localname">$localName</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.namespaceuri">$namespaceURI</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nextsibling">$nextSibling</a> ; |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodename">$nodeName</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodevalue">$nodeValue</a> ; |
|||
public readonly int <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodetype">$nodeType</a> ; |
|||
public readonly Document|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.ownerdocument">$ownerDocument</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.parentnode">$parentNode</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.prefix">$prefix</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.previoussibling">$previousSibling</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent">$textContent</a> ; |
|||
|
|||
/* Methods */ |
|||
public <a href="construct.html">__construct</a> ( ) |
|||
public <a href="createEntityReference.html">createEntityReference</a> ( string $name ) : false |
|||
public <a href="load.html">load</a> ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool |
|||
public <a href="loadHTML.html">loadHTML</a> ( string $source , null $options = null , string|null $encodingOrContentType = null ) : bool |
|||
public <a href="loadHTMLFile.html">loadHTMLFile</a> ( string $filename , null $options = null , string|null $encodingOrContentType = null ) : bool |
|||
public <a href="loadHTML.html">loadXML</a> ( string $source , null $options = null ) : false |
|||
public <a href="save.html">save</a> ( string $filename , null $options = null ) : int|false |
|||
public <a href="saveHTMLFile.html">saveHTMLFile</a> ( string $filename , null $options = null ) : int|false |
|||
public <a href="saveXML.html">saveXML</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $node = null , null $options = null ) : false |
|||
public <a href="validate.html">validate</a> ( ) : true |
|||
public <a href="xinclude.html">xinclude</a> ( null $options = null ) : false |
|||
|
|||
/* Trait Methods */ |
|||
public <a href="../ContainerNode/appendChild.html">ContainerNode::appendChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="../Node/C14N.html">Node::C14N</a> ( bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../Node/C14NFile.html">Node::C14NFile</a> ( string $uri , bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../ContainerNode/insertBefore.html">ContainerNode::insertBefore</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $child = null ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="../Walk/walk.html">Walk::walk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
|
|||
/* Magic Methods */ |
|||
public __toString() : string |
|||
|
|||
/* Inherited methods */ |
|||
public <a href="https://www.php.net/manual/en/domnode.clonenode.php">\DOMNode::cloneNode</a> ( bool $deep = false ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createattribute.php">\DOMDocument::createAttribute</a> ( string $localName ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createattributens.php">\DOMDocument::createAttributeNS</a> ( string|null $namespace , string $qualifiedName ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createcdatasection.php">\DOMDocument::createCDATASection</a> ( string $data ) : <a href="https://www.php.net/manual/en/class.domcdatasection.php">\DOMCdataSection</a>|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createcomment.php">\DOMDocument::createComment</a> ( string $data ) : Comment|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createdocumentfragment.php">\DOMDocument::createDocumentFragment</a> ( ) : DocumentFragment|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createelement.php">\DOMDocument::createElement</a> ( string $localName , string $value = "" ) : Element|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createelementns.php">\DOMDocument::createElementNS</a> ( string|null $namespace , string $qualifiedName , string $value = "" ) : Element|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createprocessinginstruction.php">\DOMDocument::createProcessingInstruction</a> ( string $target , string $data = "" ) : ProcessingInstruction|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.createtextnode.php"\DOMDocument::>\DOMDocument::createTextNode</a> ( string $data ) : Text|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.getelementbyid.php">\DOMDocument::getElementById</a> ( string $elementId ) : Element|null |
|||
public <a href="https://www.php.net/manual/en/domdocument.getelementsbytagname.php">\DOMDocument:getElementsByTagName</a> ( string $qualifiedName ) : <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> |
|||
public <a href="https://www.php.net/manual/en/domdocument.createelementsbytagnamens.php">getElementsByTagNameNS</a> ( string $namespace , string $localName ) : <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> |
|||
public <a href="https://www.php.net/manual/en/domnode.getlineno.php">\DOMNode::getLineNo</a> ( ) : int |
|||
public <a href="https://www.php.net/manual/en/domnode.getnodepath.php">\DOMNode::getNodePath</a> ( ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domnode.hasattributes.php">\DOMNode::hasAttributes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.haschildnodes.php">\DOMNode::hasChildNodes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domdocument.importnode.php">\DOMDocument::importNode</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , bool $deep = false ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domnode.isdefaultnamespace.php">\DOMNode::isDefaultNamespace</a> ( string $namespace ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issamenode.php">\DOMNode::isSameNode</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $otherNode ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issupported.php">\DOMNode::isSupported</a> ( string $feature , string $version ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupnamespaceuri.php">\DOMNode::lookupNamespaceUri</a> ( string $prefix ) : string |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupprefix.php">\DOMNode::lookupPrefix</a> ( string $namespace ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domnode.normalize.php">\DOMNode::normalize</a> ( ) : void |
|||
public <a href="https://www.php.net/manual/en/domdocument.normalizedocument.php">\DOMDocument::normalizeDocument</a> ( ) : void |
|||
public <a href="https://www.php.net/manual/en/domdocument.registernodeclass.php">\DOMDocument::registerNodeClass</a> ( string $baseClass , string|null $extendedClass ) : bool |
|||
public <a href="https://www.php.net/manual/en/domdocument.relaxngvalidate.php">\DOMDocument::relaxNGValidate</a> ( string $filename ) : bool |
|||
public <a href="https://www.php.net/manual/en/domdocument.relaxngvalidatesource.php">\DOMDocument::relaxNGValidateSource</a> ( string $source ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.removechild.php">\DOMNode::removeChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domnode.replacechild.php">\DOMNode::replaceChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.savehtml.php">\DOMDocument::saveHTML</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $node = null ) : string|false |
|||
public <a href="https://www.php.net/manual/en/domdocument.schemavalidate.php">\DOMDocument::schemaValidate</a> ( string $filename , int $flags = 0 ) : bool |
|||
public <a href="https://www.php.net/manual/en/domdocument.schemavalidatesource.php">\DOMDocument::schemaValidateSource</a> ( string $source , int $flags = 0 ) : bool |
|||
}</code></pre> |
|||
|
|||
## Constants ## |
|||
|
|||
| Constant | Value | Description | |
|||
| ----------------------------------------------------- | ----- | ------------------------------------- | |
|||
| <var>MensBeam\HTML\Document::NO_QUIRKS_MODE</var> | 0 | Document not in quirks mode | |
|||
| <var>MensBeam\HTML\Document::QUIRKS_MODE</var> | 1 | Document is in quirks mode | |
|||
| <var>MensBeam\HTML\Document::LIMITEDQUIRKS_MODE</var> | 2 | Document is in limited quirks mode | |
|||
|
|||
## Properties ## |
|||
|
|||
<dl> |
|||
<dt id="document-props-body"><var>body</var></dt> |
|||
<dd>Represents the <code>body</code> or <code>frameset</code> node of the current document, or <code>null</code> if no such element exists.</dd> |
|||
|
|||
<dt id="document-props-documentencoding"><var>documentEncoding</var></dt> |
|||
<dd>Encoding of the document, as specified when parsing or when determining encoding type. Use this instead of <a href="https://php.net/manual/en/class.domdocument.php#domdocument.props.encoding"><code>\DOMDocument::encoding</code></a>.</dd> |
|||
|
|||
<dt id="document-props-quirksmode"><var>quirksMode</var></dt> |
|||
<dd>Used when parsing. Specifies which mode the document was parsed in. One of the <a href="#page_Constants">predefined quirks mode constants</a>.</dd> |
|||
</dl> |
|||
|
|||
The following properties inherited from [`\DOMDocument`](https://www.php.net/manual/en/class.domdocument.php) have no effect in `Mensbeam\HTML\Document`, so therefore are not listed in the schema above: |
|||
|
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.actualencoding"><var>actualEncoding</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.config"><var>config</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.encoding"><var>encoding</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput"><var>formatOutput</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.preservewhitespace"><var>preserveWhiteSpace</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.recover"><var>recover</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.resolveexternals"><var>resolveExternals</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.standalone"><var>standalone</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.stricterrorchecking"><var>strictErrorChecking</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.substituteentities"><var>substituteEntities</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.validateonparse"><var>validateOnParse</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.version"><var>version</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.xmlencoding"><var>xmlEncoding</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone"><var>xmlStandalone</var></a> |
|||
* <a href="https://www.php.net/manual/en/class.domdocument.php#domdocument.props.xmlversion"><var>xmlVersion</var></a> |
@ -1,24 +0,0 @@ |
|||
--- |
|||
title: Element::getAttribute |
|||
--- |
|||
|
|||
Element::getAttribute — Returns value of attribute |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Element::getAttribute ( string $qualifiedName ) : string|null |
|||
``` |
|||
|
|||
Gets the value of the attribute with name `qualifiedName` for the current node. |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>qualifiedName</code></dt> |
|||
<dd>The name of the attribute.</dd> |
|||
</dl> |
|||
|
|||
## Return Values ## |
|||
|
|||
Returns a string on success or <code>null</code> if no attribute with the given `qualifiedName` is found. `\DOMElement::getAttribute` returns an empty string on failure which is incorrect in newer versions of the DOM. |
@ -1,26 +0,0 @@ |
|||
--- |
|||
title: Element::getAttributeNS |
|||
--- |
|||
|
|||
Element::getAttributeNS — Returns value of attribute |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Element::getAttribute ( string|null $namespace , string $localName ) : string|null |
|||
``` |
|||
|
|||
Gets the value of the attribute in namespace `namespace` with local name `localName` for the current node. |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>namespace</code></dt> |
|||
<dd>The namespace URI.</dd> |
|||
<dt><code>localName</code></dt> |
|||
<dd>The local name of the attribute.</dd> |
|||
</dl> |
|||
|
|||
## Return Values ## |
|||
|
|||
Returns a string on success or <code>null</code> if no attribute with the given `localName` and `namespace` is found. `\DOMElement::getAttribute` returns an empty string on failure which is incorrect in newer versions of the DOM. |
@ -1,100 +0,0 @@ |
|||
--- |
|||
title: Element |
|||
--- |
|||
|
|||
# The Element Class # |
|||
|
|||
## Introduction ## |
|||
|
|||
<div class="admonition"><p><strong>Note:</strong> Only new methods and methods which make outward-facing changes from <a href="https://www.php.net/manual/en/class.domelement.php">\DOMElement</a> will be documented here, otherwise they will be linked back to PHP's documentation.</p></div> |
|||
|
|||
## Class Synopsis ## |
|||
|
|||
<pre><code class="php">MensBeam\HTML\Element extends <a href="https://www.php.net/manual/en/class.domelement.php">\DOMElement</a> { |
|||
|
|||
use <a href="../ContainerNode/index.html">ContainerNode</a>, <a href="../Moonwalk/index.html">Moonwalk</a>, <a href="../Walk/index.html">Walk</a>; |
|||
|
|||
/* Properties */ |
|||
public readonly NodeList|null <a href="#element-props-classlist">$classList</a> ; |
|||
public string <a href="#element-props-innerhtml">$innerHTML</a> ; |
|||
public string <a href="#element-props-outerhtml">$outerHTML</a> ; |
|||
|
|||
/* Inherited properties */ |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodename">$nodeName</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodevalue">$nodeValue</a> ; |
|||
public readonly int <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nodetype">$nodeType</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.parentnode">$parentNode</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.childnodes">$childNodes</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.firstchild">$firstChild</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.lastchild">$lastChild</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.previoussibling">$previousSibling</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.nextsibling">$nextSibling</a> ; |
|||
public readonly <a href="https://www.php.net/manual/en/class.domnamednodemap.php">\DOMNamedNodeMap</a>|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.attributes">$attributes</a> ; |
|||
public readonly Document|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.ownerdocument">$ownerDocument</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.namespaceuri">$namespaceURI</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.prefix">$prefix</a> ; |
|||
public readonly string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.localname">$localName</a> ; |
|||
public readonly string|null <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.baseuri">$baseURI</a> ; |
|||
public string <a href="https://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent">$textContent</a> ; |
|||
|
|||
/* Methods */ |
|||
public <a href="getAttribute.html">getAttribute</a> ( string $qualifiedName ) : string|null |
|||
public <a href="getAttributeNS.html">getAttributeNS</a> ( string|null $namespace , string $localName ) : string|null |
|||
|
|||
/* Trait Methods */ |
|||
public <a href="../ContainerNode/appendChild.html">ContainerNode::appendChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="../Node/C14N.html">Node::C14N</a> ( bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../Node/C14NFile.html">Node::C14NFile</a> ( string $uri , bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="../ContainerNode/insertBefore.html">ContainerNode::insertBefore</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $child = null ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="../Moonwalk/moonwalk.html">Moonwalk::moonwalk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
public <a href="../Walk/walk.html">Walk::walk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
|
|||
/* Magic Methods */ |
|||
public __toString() : string |
|||
|
|||
/* Inherited Methods */ |
|||
public <a href="https://www.php.net/manual/en/domelement.construct.php">__construct</a> ( string $qualifiedName , string|null $value = null , string $namespace = "" ) |
|||
public <a href="https://www.php.net/manual/en/domnode.clonenode.php">\DOMNode::cloneNode</a> ( bool $deep = false ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domelement.getattributenode.php">\DOMElement::getAttributeNode</a> ( string $qualifiedName ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|false |
|||
public <a href="https://www.php.net/manual/en/domelement.getattributenodens.php">\DOMElement::getAttributeNodeNS</a> ( string|null $namespace , string $localName ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|null |
|||
public <a href="https://www.php.net/manual/en/domelement.getelementsbytagname.php">\DOMElement::getElementsByTagName</a> ( string $qualifiedName ) : <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> |
|||
public <a href="https://www.php.net/manual/en/domelement.getelementsbytagnamens.php">\DOMElement::getElementsByTagNameNS</a> ( string $namespace , string $localName ) : <a href="https://www.php.net/manual/en/class.domnodelist.php">\DOMNodeList</a> |
|||
public <a href="https://www.php.net/manual/en/domnode.getlineno.php">\DOMNode::getLineNo</a> ( ) : int |
|||
public <a href="https://www.php.net/manual/en/domnode.getnodepath.php">\DOMNode::getNodePath</a> ( ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domelement.hasattribute.php">\DOMElement::hasAttribute</a> ( string $qualifiedName ) : bool |
|||
public <a href="https://www.php.net/manual/en/domelement.hasattributens.php">\DOMElement::hasAttributeNS</a> ( string|null $namespace , string $localName ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.hasattributes.php">\DOMNode::hasAttributes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.haschildnodes.php">\DOMNode::hasChildNodes</a> ( ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.isdefaultnamespace.php">\DOMNode::isDefaultNamespace</a> ( string $namespace ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issamenode.php">\DOMNode::isSameNode</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $otherNode ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.issupported.php">\DOMNode::isSupported</a> ( string $feature , string $version ) : bool |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupnamespaceuri.php">\DOMNode::lookupNamespaceUri</a> ( string $prefix ) : string |
|||
public <a href="https://www.php.net/manual/en/domnode.lookupprefix.php">\DOMNode::lookupPrefix</a> ( string $namespace ) : string|null |
|||
public <a href="https://www.php.net/manual/en/domnode.normalize.php">\DOMNode::normalize</a> ( ) : void |
|||
public <a href="https://www.php.net/manual/en/domelement.removeattribute.php">\DOMElement::removeAttribute</a> ( string $qualifiedName ) : bool |
|||
public <a href="https://www.php.net/manual/en/domelement.removeattributenode.php">\DOMElement::removeAttributeNode</a> ( <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a> $attr ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|false |
|||
public <a href="https://www.php.net/manual/en/domelement.removeattributenodens.php">\DOMElement::removeAttributeNS</a> ( string|null $namespace , string $localName ) : void |
|||
public <a href="https://www.php.net/manual/en/domelement.setattribute.php">\DOMElement::setAttribute</a> ( string $qualifiedName , string $value ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|bool |
|||
public <a href="https://www.php.net/manual/en/domnode.removechild.php">\DOMNode::removeChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domnode.replacechild.php">\DOMNode::replaceChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="https://www.php.net/manual/en/domelement.setattributenode.php">\DOMElement::setAttributeNode</a> ( <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a> $attr ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|null|false |
|||
public <a href="https://www.php.net/manual/en/domelement.setattributenodens.php">\DOMElement::setAttributeNodeNS</a> ( <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a> $attr ) : <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a>|null|false |
|||
public <a href="https://www.php.net/manual/en/domelement.setattributens.php">\DOMElement::setAttributeNS</a> ( string|null $namespace , string $qualifiedName , string $value ) : void |
|||
public <a href="https://www.php.net/manual/en/domelement.setidattribute.php">\DOMElement::setIdAttribute</a> ( string $qualifiedName , bool $isId ) : void |
|||
public <a href="https://www.php.net/manual/en/domelement.setidattributenode.php">\DOMElement::setIdAttributeNode</a> ( <a href="https://www.php.net/manual/en/class.domattr.php">\DOMAttr</a> $attr , bool $isId ) : void |
|||
public <a href="https://www.php.net/manual/en/domelement.setidattributens.php">\DOMElement::setIdAttributeNS</a> ( string $namespace , string $qualifiedName , bool $isId ) : void |
|||
|
|||
}</code></pre> |
|||
|
|||
## Properties ## |
|||
|
|||
<dl> |
|||
<dt id="element-props-classlist"><var>classList</var></dt> |
|||
<dd>A live <a href="../TokenList/TokenList.html">TokenList</a> collection of the class attributes of the element. This can then be used to manipulate the class list.</dd> |
|||
|
|||
<dt id="element-props-innerhtml"><var>innerHTML</var></dt> |
|||
<dd>Gets or sets the HTML or XML markup contained within the element</dd> |
|||
|
|||
<dt id="element-props-outerhtml"><var>outerHTML</var></dt> |
|||
<dd>Gets the serialized HTML fragment describing the element including its descendants. It can also be set to replace the element with nodes parsed from the given string.</dd> |
|||
</dl> |
@ -1,55 +0,0 @@ |
|||
--- |
|||
title: ContainerNode::appendChild |
|||
--- |
|||
|
|||
ContainerNode::appendChild — Adds new child at the end of the children |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public ContainerNode::appendChild ( \DOMNode $node ) : \DOMNode|false |
|||
``` |
|||
|
|||
This function appends a child to an existing list of children or creates a new list of children. The child can be created with e.g. [`Document::createElement()`](https://www.php.net/manual/en/domdocument.createelement.php), [`Document::createTextNode()`](https://www.php.net/manual/en/domdocument.createtextnode.php) etc. or simply by using any other node. |
|||
|
|||
When using an existing node it will be moved. |
|||
|
|||
<div class="warning"> |
|||
<p><strong>Warning</strong> Only the following element types may be appended to any node using <code>Node</code> and subject to hierarchy restrictions depending on the type of node being appended to:</p> |
|||
|
|||
<ul> |
|||
<li><code>Comment</code></li> |
|||
<li><code>DocumentFragment</code></li> |
|||
<li><a href="https://www.php.net/manual/en/class.domdocumenttype.php"><code>\DOMDocumentType</code></a></li> |
|||
<li><code>Element</code></li> |
|||
<li><code>ProcessingInstruction</code></li> |
|||
<li><code>Text</code></li> |
|||
</ul> |
|||
|
|||
<p>Note that <code>\DOMAttr</code> is missing from this list.</p> |
|||
</div> |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>node</code></dt> |
|||
<dd>The new node.</dd> |
|||
</dl> |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Adding a child to the body** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->loadHTML('<!DOCTYPE html><html><head><title>Ook!</title></head><body></body></html>'); |
|||
|
|||
$node = $dom->createElement('br'); |
|||
$dom->body->appendChild($node); |
|||
|
|||
?> |
|||
``` |
@ -1,40 +0,0 @@ |
|||
--- |
|||
title: ContainerNode::insertBefore |
|||
--- |
|||
|
|||
ContainerNode::insertBefore — Adds a new child before a reference node |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public ContainerNode::insertBefore ( \DOMNode $node , \DOMNode|null $child = null ) : \DOMNode|false |
|||
``` |
|||
|
|||
This function inserts a new node right before the reference node. If you plan to do further modifications on the appended child you must use the returned node. |
|||
|
|||
When using an existing node it will be moved. |
|||
|
|||
<div class="warning"> |
|||
<p><strong>Warning</strong> Only the following element types may be appended to any node using <code>Node</code> and subject to hierarchy restrictions depending on the type of node being appended to:</p> |
|||
|
|||
<ul> |
|||
<li><code>Comment</code></li> |
|||
<li><code>DocumentFragment</code></li> |
|||
<li><a href="https://www.php.net/manual/en/class.domdocumenttype.php"><code>\DOMDocumentType</code></a></li> |
|||
<li><code>Element</code></li> |
|||
<li><code>ProcessingInstruction</code></li> |
|||
<li><code>Text</code></li> |
|||
</ul> |
|||
|
|||
<p>Note that <code>\DOMAttr</code> is missing from this list.</p> |
|||
</div> |
|||
|
|||
## Parameters ## |
|||
|
|||
<dl> |
|||
<dt><code>node</code></dt> |
|||
<dd>The new node.</dd> |
|||
|
|||
<dt><code>child</code></dt> |
|||
<dd>The reference node. If not supplied, <code>node</code> is appended to the children.</dd> |
|||
</dl> |
@ -1,14 +0,0 @@ |
|||
# The ContainerNode trait # |
|||
|
|||
## Introduction ## |
|||
|
|||
Allows the extended PHP DOM classes to simulate inheriting from a theoretical extended [\DOMNode](https://www.php.net/manual/en/class.domnode.php). This one implements improved DOM child insertion methods. |
|||
|
|||
<pre><code class="php">trait MensBeam\HTML\ContainerNode { |
|||
|
|||
use <a href="../Node/index.html">Node</a>; |
|||
|
|||
public <a href="appendChild.html">appendChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
public <a href="insertBefore.html">insertBefore</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $child = null ) : <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|false |
|||
|
|||
}</code></pre> |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: LeafNode::appendChild |
|||
--- |
|||
|
|||
LeafNode::appendChild — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public LeafNode::appendChild ( \DOMNode $node ) : DOMException |
|||
``` |
|||
|
|||
Throws a `DOMException` upon use. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: LeafNode::insertBefore |
|||
--- |
|||
|
|||
LeafNode::insertBefore — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public LeafNode::insertBefore ( \DOMNode $node , \DOMNode|null $child = null ) : DOMException |
|||
``` |
|||
|
|||
Throws a `DOMException` upon use. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: LeafNode::removeChild |
|||
--- |
|||
|
|||
LeafNode::removeChild — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public LeafNode::removeChild ( \DOMNode $node ) : DOMException |
|||
``` |
|||
|
|||
Throws a `DOMException` upon use. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: LeafNode::replaceChild |
|||
--- |
|||
|
|||
LeafNode::replaceChild — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public LeafNode::replaceChild ( \DOMNode $node , \DOMNode $child ) : DOMException |
|||
``` |
|||
|
|||
Throws a `DOMException` upon use. |
@ -1,16 +0,0 @@ |
|||
# The LeafNode trait # |
|||
|
|||
## Introduction ## |
|||
|
|||
Allows the extended PHP DOM classes to simulate inheriting from a theoretical extended [\DOMNode](https://www.php.net/manual/en/class.domnode.php). This one disables all DOM child insertion methods. |
|||
|
|||
<pre><code class="php">trait MensBeam\HTML\LeafNode { |
|||
|
|||
use <a href="../Node/index.html">Node</a>; |
|||
|
|||
public <a href="appendChild.html">appendChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node ) : DOMException |
|||
public <a href="Node_insertBefore.html">insertBefore</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node , <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a>|null $child = null ) : DOMException |
|||
public <a href="removeChild.html">removeChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : DOMException |
|||
public <a href="replaceChild.html">replaceChild</a> ( <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $node, <a href="https://www.php.net/manual/en/class.domnode.php">\DOMNode</a> $child ) : DOMException |
|||
|
|||
}</code></pre> |
@ -1,43 +0,0 @@ |
|||
--- |
|||
title: Moonwalk::moonwalk |
|||
--- |
|||
|
|||
Moonwalk::moonwalk — Output generator for walking up the DOM tree |
|||
|
|||
## Description ## |
|||
|
|||
<pre><code class="php">public Moonwalk::moonwalk ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
</code></pre> |
|||
|
|||
Non-standard. Creates a [`\Generator`](https://www.php.net/manual/en/class.generator.php) object for walking up the DOM tree. This is in lieu of recreating the awful [DOM TreeWalker API](https://developer.mozilla.org/en-US/docs/Web/API/Treewalker). |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Print name of all ancestors of the H1 element** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->loadHTML('<!DOCTYPE html><html><head><title>Ook!</title></head><body><h1>Eek</h1></body></html>'); |
|||
$h1 = $dom->getElementsByTagName('h1')->item(0); |
|||
|
|||
// All ancestors will be elements so there's no reason to have a filter. |
|||
$tree = $h1->moonwalk(); |
|||
|
|||
foreach ($tree as $t) { |
|||
echo "{$t->nodeName}\n"; |
|||
} |
|||
|
|||
?> |
|||
``` |
|||
|
|||
The above example will output something similar to: |
|||
|
|||
```php |
|||
body |
|||
html |
|||
|
|||
``` |
@ -1,11 +0,0 @@ |
|||
# The Moonwalk trait # |
|||
|
|||
## Introduction ## |
|||
|
|||
Allows the extended PHP DOM classes to Moonwalk up the DOM via a [`\Generator`](https://www.php.net/manual/en/class.generator.php). This is in lieu of recreating the awful [DOM TreeMoonwalker API](https://developer.mozilla.org/en-US/docs/Web/API/TreeMoonwalker). |
|||
|
|||
<pre><code class="php">trait MensBeam\HTML\Moonwalk { |
|||
|
|||
public <a href="Moonwalk.html">Moonwalk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a> $filter ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
|
|||
}</code></pre> |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Node::C14N |
|||
--- |
|||
|
|||
Node::C14N — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Node::C14N ( bool $exclusive = false , bool $withComments = false , array|null $xpath = null , array|null $nsPrefixes = null ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. `\DOMNode::C14N` is an extremely slow and inefficient method to serialize DOM and never should be used. |
@ -1,13 +0,0 @@ |
|||
--- |
|||
title: Node::C14NFile |
|||
--- |
|||
|
|||
Document::C14NFile — **DISABLED** |
|||
|
|||
## Description ## |
|||
|
|||
```php |
|||
public Node::C14NFile ( string $uri , bool $exclusive = false , bool $withComments = false , array|null $xpath = null , array|null $nsPrefixes = null ) : false |
|||
``` |
|||
|
|||
This function has been disabled and will always return `false`. `\DOMNode::C14NFile` is an extremely slow and inefficient method to serialize DOM and never should be used. |
@ -1,12 +0,0 @@ |
|||
# The Node trait # |
|||
|
|||
## Introduction ## |
|||
|
|||
Allows the extended PHP DOM classes to simulate inheriting from a theoretical extended [\DOMNode](https://www.php.net/manual/en/class.domnode.php). It is used to disable [C14N](C14N.html) and [C14NFile](C14NFile.html). |
|||
|
|||
<pre><code class="php">trait MensBeam\HTML\Node { |
|||
|
|||
public <a href="C14N.html">C14N</a> ( bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
public <a href="C14NFile.html">C14NFile</a> ( string $uri , bool $exclusive = false , bool $withComments = false , null $xpath = null , null $nsPrefixes = null ) : false |
|||
|
|||
}</code></pre> |
@ -1,45 +0,0 @@ |
|||
--- |
|||
title: Walk::walk |
|||
--- |
|||
|
|||
Walk::walk — Output generator for walking down the DOM tree |
|||
|
|||
## Description ## |
|||
|
|||
<pre><code class="php">public Walk::walk ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a>|null $filter = null ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
</code></pre> |
|||
|
|||
Non-standard. Creates a [`\Generator`](https://www.php.net/manual/en/class.generator.php) object for walking down the DOM tree. This is in lieu of recreating the awful [DOM TreeWalker API](https://developer.mozilla.org/en-US/docs/Web/API/Treewalker). |
|||
|
|||
## Examples ## |
|||
|
|||
**Example \#1 Print name of every Element** |
|||
|
|||
```php |
|||
<?php |
|||
|
|||
namespace MensBeam\HTML; |
|||
|
|||
$dom = new Document(); |
|||
$dom->loadHTML('<!DOCTYPE html><html><head><title>Ook!</title></head><body><h1>Eek</h1></body></html>'); |
|||
$tree = $dom->walk(function($node) { |
|||
return ($node instanceof Element); |
|||
}); |
|||
|
|||
foreach ($tree as $t) { |
|||
echo "{$t->nodeName}\n"; |
|||
} |
|||
|
|||
?> |
|||
``` |
|||
|
|||
The above example will output something similar to: |
|||
|
|||
```php |
|||
html |
|||
head |
|||
title |
|||
body |
|||
h1 |
|||
|
|||
``` |
@ -1,11 +0,0 @@ |
|||
# The Walk trait # |
|||
|
|||
## Introduction ## |
|||
|
|||
Allows the extended PHP DOM classes to walk down the DOM via a [`\Generator`](https://www.php.net/manual/en/class.generator.php). This is in lieu of recreating the awful [DOM TreeWalker API](https://developer.mozilla.org/en-US/docs/Web/API/Treewalker). |
|||
|
|||
<pre><code class="php">trait MensBeam\HTML\Walk { |
|||
|
|||
public <a href="walk.html">walk</a> ( <a href="https://www.php.net/manual/en/class.closure.php">\Closure</a> $filter ) : <a href="https://www.php.net/manual/en/class.generator.php">\Generator</a> |
|||
|
|||
}</code></pre> |
@ -1 +0,0 @@ |
|||
The MensBeam HTML library works by parsing HTML strings into PHP's existing XML DOM. It, however, has to force the antiquated PHP DOM extension into working properly with modern HTML DOM by extending many of the node types. The documentation below follows PHP's doc style guide as closely as possible. Each class should be listed separately in the menu under this section. |
@ -1 +0,0 @@ |
|||
Welcome to the user manual for HTML. It is included with each copy of the software, and is also [available online](https://mensbeam.com/html/en/). Please select a language above. |
@ -1,9 +0,0 @@ |
|||
{ |
|||
"favicon": "<theme_url>favicon.png", |
|||
"js": [ |
|||
"<theme_url>daux.min.js" |
|||
], |
|||
"css": [ |
|||
"<theme_url>php.css" |
|||
] |
|||
} |
@ -1,2 +0,0 @@ |
|||
var e=document.querySelectorAll(".s-content pre"),t=document.querySelector(".CodeToggler"),n="daux_code_blocks_hidden";function a(t){for(var a=0;a<e.length;a++)e[a].classList.toggle("Hidden",t);try{localStorage.setItem(n,t)}catch(e){}}t&&(e.length?function(){var e=t.querySelector(".CodeToggler__button--main");e.addEventListener("change",(function(e){a(!e.target.checked)}),!1);var r=!1;try{"false"===(r=localStorage.getItem(n))?r=!1:"true"===r&&(r=!0),r&&(a(!!r),e.checked=!r)}catch(e){}}():t.classList.add("Hidden"));var r=document.querySelector(".Collapsible__trigger");if(r){var o=document.querySelector(".Collapsible__content");r.addEventListener("click",(function(e){o.classList.contains("Collapsible__content--open")?(o.style.height=0,o.classList.remove("Collapsible__content--open"),r.setAttribute("aria-expanded","false")):(r.setAttribute("aria-expanded","true"),o.style.transitionDuration="150ms",o.style.height="".concat(o.scrollHeight,"px"),o.classList.add("Collapsible__content--open"))}))}var l=document.querySelectorAll("pre > code:not(.hljs)");if(l.length){var i=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.async=!0,c.src="".concat(window.base_url,"daux_libraries/highlight.pack.js"),c.onload=function(e){[].forEach.call(l,window.hljs.highlightBlock)},i.appendChild(c)}function s(e){var t=void 0!==e.preventDefault;t&&e.preventDefault();var n=function(e){for(var t=e;(t=t.parentNode)&&9!==t.nodeType;)if(1===t.nodeType&&t.classList.contains("Nav__item"))return t;throw new Error("Could not find a NavItem...")}(e.target),a=n.querySelector("ul.Nav");t&&n.classList.contains("Nav__item--open")?(a.style.height="".concat(a.scrollHeight,"px"),a.style.transitionDuration="150ms",a.style.height="0px",n.classList.remove("Nav__item--open")):t?(a.style.transitionDuration="150ms",a.addEventListener("transitionend",(function e(t){"0px"!==t.target.style.height&&(t.target.style.height="auto"),t.target.removeEventListener("transitionend",e)})),a.style.height="".concat(a.scrollHeight,"px"),n.classList.add("Nav__item--open")):a.style.height="auto"}for(var d,u=document.querySelectorAll(".Nav__item.has-children i.Nav__arrow"),h=u.length-1;h>=0;h--)(d=u[h]).addEventListener("click",s),d.parentNode.parentNode.classList.contains("Nav__item--open")&&s({target:d});var g=document.querySelectorAll(".Nav__item__link--nopage"),v=!0,p=!1,_=void 0;try{for(var y,m=g[Symbol.iterator]();!(v=(y=m.next()).done);v=!0){y.value.addEventListener("click",s)}}catch(e){p=!0,_=e}finally{try{v||null==m.return||m.return()}finally{if(p)throw _}} |
|||
//# sourceMappingURL=daux.min.js.map
|
File diff suppressed because one or more lines are too long
@ -1,324 +0,0 @@ |
|||
/* Daux imports; fonts are omitted */ |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/vendor/normalize.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_variables.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_mixins.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_structure.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_typography.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_components.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_homepage.scss"; |
|||
@import "../../../vendor/daux/daux.io/src/css/theme_daux/_print.scss" print; |
|||
|
|||
/* Overrides */ |
|||
|
|||
:root { |
|||
--font-family-text: sans-serif; |
|||
--font-family-monospace: "Operator Mono SSm", "Operator Mono", monospace; |
|||
--font-family-heading: sans-serif; |
|||
|
|||
--type-size-1: 1.75rem; |
|||
--type-size-2: 1.5rem; |
|||
--type-size-3: 1.25rem; |
|||
--type-size-4: 1.125rem; |
|||
--type-size-5: 1rem; |
|||
--type-size-6: 1rem; |
|||
|
|||
--purple: #4f5b93; |
|||
--tyrian: #793862; |
|||
--light-purple: #8892bf; |
|||
--lighter-purple: #c4c9df; |
|||
--danger: #f4dfdf; |
|||
|
|||
--page: #f2f2f2; |
|||
--text: #333; |
|||
|
|||
--red: #e63c2f; |
|||
--blue: #15284b; |
|||
--light-blue: #93b7bb; |
|||
--beige: #e8d5d3; |
|||
--green: #2c9a42; |
|||
|
|||
--dark-gray: color(var(--page) blend(var(--text) 75%)); |
|||
--gray: color(var(--page) blend(var(--text) 50%)); |
|||
--light-gray: color(var(--page) blend(var(--text) 25%)); |
|||
--lighter-gray: color(var(--page) blend(var(--text) 12.5%)); |
|||
--lightest-gray: color(#fff blend(var(--page) 75%)); |
|||
|
|||
--dark: var(--text); |
|||
--light: var(--light-purple); |
|||
|
|||
--sidebar-background: var(--text); |
|||
--sidebar-link-active-background: var(--tyrian); |
|||
--sidebar-link-color: var(--page); |
|||
--sidebar-link-secondary-color: var(--page); |
|||
--sidebar-collapsible--hamburger-color: var(--beige); |
|||
|
|||
--link-color: #369; |
|||
--brand-color: #fff; |
|||
--brand-background: var(--purple); |
|||
|
|||
--code-tag-background-color: transparent; |
|||
--code-tag-border-radius: 0; |
|||
--code-tag-box-shadow: none; |
|||
|
|||
--homepage-navbar-background: var(--red); |
|||
--hero-button-block-background: var(--beige); |
|||
--homepage-hero-background: #fff; |
|||
--content-floating-blocks-background: var(--blue); |
|||
} |
|||
|
|||
body { |
|||
line-height: 1.618; |
|||
font-size: 16px; |
|||
color: var(--text) !important; |
|||
} |
|||
|
|||
body, .Columns__right__content { |
|||
background-color: var(--page); |
|||
} |
|||
|
|||
a.Link--external::after { |
|||
content: ''; |
|||
} |
|||
|
|||
.Page__header h1 { |
|||
font-size: var(--type-size-6); |
|||
border-bottom: 0; |
|||
margin-bottom: 0; |
|||
} |
|||
|
|||
.s-content { |
|||
h1, h2, h3, h4, h5, h6 { |
|||
margin-bottom: 1.5rem; |
|||
} |
|||
|
|||
h1 { |
|||
font-size: var(--type-size-1); |
|||
} |
|||
|
|||
h2 { |
|||
font-size: var(--type-size-2); |
|||
} |
|||
|
|||
h3 { |
|||
font-size: var(--type-size-3); |
|||
} |
|||
|
|||
h4 { |
|||
font-size: var(--type-size-4); |
|||
} |
|||
|
|||
h5 { |
|||
font-size: var(--type-size-5); |
|||
} |
|||
|
|||
h6 { |
|||
font-size: var(--type-size-6); |
|||
} |
|||
|
|||
|
|||
code { |
|||
padding-top: 0; |
|||
padding-bottom: 0; |
|||
padding: 0; |
|||
border: 0; |
|||
margin: 0; |
|||
|
|||
&::before, &::after { |
|||
display: none; |
|||
} |
|||
|
|||
pre & { |
|||
display: inline; |
|||
} |
|||
} |
|||
|
|||
table { |
|||
border-collapse: separate; |
|||
border-spacing: 2px; |
|||
border: 2px solid var(--gray); |
|||
|
|||
thead, tbody { |
|||
background-color: #fff; |
|||
} |
|||
|
|||
tr { |
|||
border-top: 0; |
|||
|
|||
&:nth-child(2n) { |
|||
background-color: transparent; |
|||
|
|||
td { |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
th, td { |
|||
border: 0; |
|||
} |
|||
|
|||
th { |
|||
background-color: var(--lighter-purple); |
|||
} |
|||
} |
|||
} |
|||
|
|||
.s-content table, .Nav__item .Nav__item { |
|||
font-size: 1rem; |
|||
} |
|||
|
|||
.Brand, h1, h2, h3, h4, h5, h6 { |
|||
font-weight: 600; |
|||
font-stretch: condensed; |
|||
} |
|||
|
|||
h1, h2, h3, h4, h5, h6 { |
|||
color: var(--tyrian); |
|||
border-bottom: 1px dotted var(--text); |
|||
padding-bottom: 5px; |
|||
} |
|||
|
|||
.Button { |
|||
border-radius: 0; |
|||
} |
|||
|
|||
.HomepageButtons .Button--hero { |
|||
font-weight: normal; |
|||
font-size: var(--type-size-6); |
|||
} |
|||
|
|||
.Page__header { |
|||
border-bottom: 0; |
|||
} |
|||
|
|||
.Pager li > a { |
|||
border: 2px solid var(--lighter-gray); |
|||
border-radius: 0; |
|||
|
|||
&:hover, &:focus { |
|||
background-color: var(--lighter-gray); |
|||
} |
|||
} |
|||
|
|||
.Pager--prev a::before { |
|||
content: "\2190\00a0"; |
|||
} |
|||
.Pager--next a::after { |
|||
content: "\00a0\2192"; |
|||
} |
|||
|
|||
.Navbar { |
|||
height: auto; |
|||
box-shadow: none; |
|||
|
|||
.Brand { |
|||
float: none; |
|||
line-height: inherit; |
|||
height: auto; |
|||
} |
|||
} |
|||
|
|||
.Homepage { |
|||
padding-top: 10px !important; |
|||
} |
|||
|
|||
.Nav__item { |
|||
font-size: var(--type-size-6); |
|||
} |
|||
|
|||
.Nav .Nav .Nav__item a { |
|||
padding-left: 35px; |
|||
} |
|||
|
|||
.Nav__arrow:before { |
|||
margin: 0 0 0 -.25em; |
|||
top: auto; |
|||
bottom: calc(50% - 0.0625em); |
|||
width: 0.375em; |
|||
height: 0.375em; |
|||
transform-origin: center; |
|||
} |
|||
|
|||
.Nav__arrow:before, .Nav .Nav .Nav__item a .Nav__arrow:before { |
|||
border-right-color: var(--page); |
|||
border-top-color: var(--page); |
|||
} |
|||
|
|||
.admonition { |
|||
padding: 0.75rem; |
|||
margin: 1.5rem 0; |
|||
border: 1px solid var(--light-gray); |
|||
background-color: #fff; |
|||
|
|||
p:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
|
|||
.danger { |
|||
background-color: var(--danger); |
|||
border-color: color(var(--danger) blend(var(--text) 25%)); |
|||
} |
|||
} |
|||
|
|||
.hljs, .s-content pre { |
|||
background: var(--blue); |
|||
color: var(--beige); |
|||
} |
|||
|
|||
.hljs { |
|||
display: block; |
|||
overflow-x: auto; |
|||
padding: 0.5em; |
|||
} |
|||
|
|||
.hljs-emphasis { |
|||
font-style: italic; |
|||
} |
|||
|
|||
.hljs-strong { |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.hljs-comment, .hljs-quote { |
|||
color: #978e9c; |
|||
} |
|||
|
|||
/* Green */ |
|||
.hljs-keyword, .hljs-selector-tag, .hljs-addition { |
|||
color: #acb39a; |
|||
} |
|||
|
|||
/* Cyan */ |
|||
.hljs-number, .hljs-string, .hljs-meta .hljs-meta-string, .hljs-literal, .hljs-doctag, .hljs-regexp { |
|||
color: var(--light-blue); |
|||
} |
|||
|
|||
/* Blue */ |
|||
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-id, .hljs-selector-class { |
|||
color: #82b7e5; |
|||
} |
|||
|
|||
/* Yellow */ |
|||
.hljs-attribute, .hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-class .hljs-title, .hljs-type { |
|||
color: #c5b031; |
|||
} |
|||
|
|||
/* Orange */ |
|||
.hljs-symbol, .hljs-bullet, .hljs-subst, .hljs-meta, .hljs-meta .hljs-keyword, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-link { |
|||
color: #ea8031; |
|||
} |
|||
|
|||
/* Red */ |
|||
.hljs-built_in, .hljs-deletion { |
|||
color: var(--red); |
|||
} |
|||
|
|||
.hljs-formula { |
|||
background: #686986; |
|||
} |
|||
|
|||
@media (--viewport-large) { |
|||
.Columns__left { |
|||
border: 0; |
|||
} |
|||
} |
@ -1,17 +0,0 @@ |
|||
{ |
|||
"devDependencies": { |
|||
"autoprefixer": "^9.6.1", |
|||
"postcss": "^7.0.0", |
|||
"postcss-cli": "^7.1.1", |
|||
"postcss-color-function": "^4.1.0", |
|||
"postcss-csso": "^4.0.0", |
|||
"postcss-custom-media": "^7.0.8", |
|||
"postcss-custom-properties": "^9.0.2", |
|||
"postcss-discard-comments": "^4.0.2", |
|||
"postcss-import": "^12.0.1", |
|||
"postcss-media-minmax": "^4.0.0", |
|||
"postcss-nested": "^4.1.2", |
|||
"postcss-sassy-mixins": "^2.1.0", |
|||
"postcss-scss": "^2.0.0" |
|||
} |
|||
} |
@ -1,17 +0,0 @@ |
|||
module.exports = ctx => ({ |
|||
//map: ctx.options.map,
|
|||
parser: 'postcss-scss', |
|||
//syntax: 'postcss-scss',
|
|||
plugins: { |
|||
'postcss-import': { root: ctx.file.dirname }, |
|||
'postcss-discard-comments': {}, |
|||
'postcss-sassy-mixins': {}, |
|||
'postcss-custom-media': {preserve: false}, |
|||
'postcss-media-minmax': {}, |
|||
'postcss-custom-properties': {preserve: false}, |
|||
'postcss-color-function': {}, |
|||
'postcss-nested': {}, |
|||
'autoprefixer': {}, |
|||
'postcss-csso': {}, |
|||
} |
|||
}) |
File diff suppressed because it is too large
Loading…
Reference in new issue