mirror of
https://github.com/danog/sass-site.git
synced 2025-01-09 14:38:39 +01:00
1578 lines
63 KiB
HTML
1578 lines
63 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>
|
||
|
Class: Sass::Selector::CommaSequence
|
||
|
|
||
|
— Documentation by YARD 0.9.12
|
||
|
|
||
|
</title>
|
||
|
|
||
|
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
||
|
|
||
|
<link rel="stylesheet" href="../../../assets/css/docs.css" type="text/css" charset="utf-8" />
|
||
|
|
||
|
<script type="text/javascript" charset="utf-8">
|
||
|
hasFrames = window.top.frames.main ? true : false;
|
||
|
relpath = '../../';
|
||
|
framesUrl = "../../frames.html#!Sass/Selector/CommaSequence.html";
|
||
|
</script>
|
||
|
|
||
|
|
||
|
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
||
|
|
||
|
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="header">
|
||
|
<div id="menu">
|
||
|
|
||
|
<a href="../../_index.html">Index (C)</a> »
|
||
|
<span class='title'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span> » <span class='title'><span class='object_link'><a href="../Selector.html" title="Sass::Selector (module)">Selector</a></span></span>
|
||
|
»
|
||
|
<span class="title">CommaSequence</span>
|
||
|
|
||
|
|
||
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
||
|
</div>
|
||
|
|
||
|
<div id="search">
|
||
|
|
||
|
<a class="full_list_link" id="class_list_link"
|
||
|
href="../../class_list.html">
|
||
|
Class List
|
||
|
</a>
|
||
|
|
||
|
<a class="full_list_link" id="method_list_link"
|
||
|
href="../../method_list.html">
|
||
|
Method List
|
||
|
</a>
|
||
|
|
||
|
<a class="full_list_link" id="file_list_link"
|
||
|
href="../../file_list.html">
|
||
|
File List
|
||
|
</a>
|
||
|
|
||
|
</div>
|
||
|
<div class="clear"></div>
|
||
|
</div>
|
||
|
|
||
|
<iframe id="search_frame"></iframe>
|
||
|
|
||
|
<div id="content"><h1>Class: Sass::Selector::CommaSequence
|
||
|
|
||
|
|
||
|
|
||
|
</h1>
|
||
|
|
||
|
<dl class="box">
|
||
|
|
||
|
<dt class="r1">Inherits:</dt>
|
||
|
<dd class="r1">
|
||
|
<span class="inheritName"><span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></span>
|
||
|
|
||
|
<ul class="fullTree">
|
||
|
<li>Object</li>
|
||
|
|
||
|
<li class="next"><span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></li>
|
||
|
|
||
|
<li class="next">Sass::Selector::CommaSequence</li>
|
||
|
|
||
|
</ul>
|
||
|
<a href="#" class="inheritanceTree">show all</a>
|
||
|
|
||
|
</dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="r2 last">Defined in:</dt>
|
||
|
<dd class="r2 last">.ruby-sass/lib/sass/selector/comma_sequence.rb</dd>
|
||
|
|
||
|
</dl>
|
||
|
<div class="clear"></div>
|
||
|
|
||
|
<h2>Overview</h2><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>A comma-separated sequence of selectors.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<h2>Constant Summary</h2>
|
||
|
|
||
|
<dl class="constants">
|
||
|
|
||
|
<dt id="compound_extend_deprecation-classvariable" class="">@@compound_extend_deprecation =
|
||
|
|
||
|
</dt>
|
||
|
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Deprecation.html" title="Sass::Deprecation (class)">Deprecation</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Deprecation.html#initialize-instance_method" title="Sass::Deprecation#initialize (method)">new</a></span></span></pre></dd>
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
||
|
<ul class="summary">
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#members-instance_method" title="#members (instance method)">#<strong>members</strong> ⇒ Array<Sequence> </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="note title readonly">readonly</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>The comma-separated selector sequences represented by this class.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h3 class="inherited">Attributes inherited from <span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></h3>
|
||
|
<p class="inherited"><span class='object_link'><a href="AbstractSequence.html#filename-instance_method" title="Sass::Selector::AbstractSequence#filename (method)">#filename</a></span>, <span class='object_link'><a href="AbstractSequence.html#line-instance_method" title="Sass::Selector::AbstractSequence#line (method)">#line</a></span></p>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>
|
||
|
Instance Method Summary
|
||
|
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
||
|
</h2>
|
||
|
|
||
|
<ul class="summary">
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#contains_parent_ref%3F-instance_method" title="#contains_parent_ref? (instance method)">#<strong>contains_parent_ref?</strong> ⇒ Boolean </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Returns whether there's a <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selector anywhere in this sequence.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#do_extend-instance_method" title="#do_extend (instance method)">#<strong>do_extend</strong>(extends, parent_directives = [], replace = false, seen = Set.new, original = true) ⇒ CommaSequence </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Non-destrucively extends this selector with the extensions specified in a
|
||
|
hash (which should come from <span class='object_link'><a href="../Tree/Visitors/Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Tree::Visitors::Cssize</a></span>).</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(seqs) ⇒ CommaSequence </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
<span class="note title constructor">constructor</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>A new instance of CommaSequence.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#inspect-instance_method" title="#inspect (instance method)">#<strong>inspect</strong> ⇒ String </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Returns a string representation of the sequence.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#populate_extends-instance_method" title="#populate_extends (instance method)">#<strong>populate_extends</strong>(extends, extendee, extend_node = nil, parent_directives = [], allow_compound_target = false) ⇒ Object </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Populates a subset map that can then be used to extend selectors.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#resolve_parent_refs-instance_method" title="#resolve_parent_refs (instance method)">#<strong>resolve_parent_refs</strong>(super_cseq, implicit_parent = true) ⇒ CommaSequence </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Resolves the <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selectors within this selector by replacing them with
|
||
|
the given parent selector, handling commas appropriately.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#superselector%3F-instance_method" title="#superselector? (instance method)">#<strong>superselector?</strong>(cseq) ⇒ Boolean </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Returns whether or not this selector matches all elements that the given
|
||
|
selector matches (as well as possibly more).</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong>(opts = {}) ⇒ Object </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'></div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#to_sass_script-instance_method" title="#to_sass_script (instance method)">#<strong>to_sass_script</strong> ⇒ Sass::Script::Value::List </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Returns a SassScript representation of this selector.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
<li class="public ">
|
||
|
<span class="summary_signature">
|
||
|
|
||
|
<a href="#unify-instance_method" title="#unify (instance method)">#<strong>unify</strong>(other) ⇒ CommaSequence<sup>?</sup> </a>
|
||
|
|
||
|
|
||
|
|
||
|
</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<span class="summary_desc"><div class='inline'>
|
||
|
<p>Unifies this with another comma selector to produce a selector that matches
|
||
|
(a subset of) the intersection of the two inputs.</p>
|
||
|
</div></span>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="AbstractSequence.html" title="Sass::Selector::AbstractSequence (class)">AbstractSequence</a></span></h3>
|
||
|
<p class="inherited"><span class='object_link'><a href="AbstractSequence.html#eql%3F-instance_method" title="Sass::Selector::AbstractSequence#eql? (method)">#eql?</a></span>, <span class='object_link'><a href="AbstractSequence.html#hash-instance_method" title="Sass::Selector::AbstractSequence#hash (method)">#hash</a></span>, <span class='object_link'><a href="AbstractSequence.html#invisible%3F-instance_method" title="Sass::Selector::AbstractSequence#invisible? (method)">#invisible?</a></span>, <span class='object_link'><a href="AbstractSequence.html#specificity-instance_method" title="Sass::Selector::AbstractSequence#specificity (method)">#specificity</a></span></p>
|
||
|
<div id="constructor_details" class="method_details_list">
|
||
|
<h2>Constructor Details</h2>
|
||
|
|
||
|
<div class="method_details first">
|
||
|
<h3 class="signature first" id="initialize-instance_method">
|
||
|
|
||
|
#<strong>initialize</strong>(seqs) ⇒ <tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns a new instance of CommaSequence</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>seqs</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Array<<span class='object_link'><a href="Sequence.html" title="Sass::Selector::Sequence (class)">Sequence</a></span>></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>See <span class='object_link'><a href="#members-instance_method" title="Sass::Selector::CommaSequence#members (method)">#members</a></span></p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
14
|
||
|
15
|
||
|
16</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 14</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_seqs'>seqs</span><span class='rparen'>)</span>
|
||
|
<span class='ivar'>@members</span> <span class='op'>=</span> <span class='id identifier rubyid_seqs'>seqs</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
<div id="constructor_details" class="method_details_list">
|
||
|
<h2>Constructor Details</h2>
|
||
|
|
||
|
<div class="method_details first">
|
||
|
<h3 class="signature first" id="initialize-instance_method">
|
||
|
|
||
|
#<strong>initialize</strong>(seqs) ⇒ <tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns a new instance of CommaSequence</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>seqs</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Array<<span class='object_link'><a href="Sequence.html" title="Sass::Selector::Sequence (class)">Sequence</a></span>></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>See <span class='object_link'><a href="#members-instance_method" title="Sass::Selector::CommaSequence#members (method)">#members</a></span></p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
14
|
||
|
15
|
||
|
16</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 14</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_seqs'>seqs</span><span class='rparen'>)</span>
|
||
|
<span class='ivar'>@members</span> <span class='op'>=</span> <span class='id identifier rubyid_seqs'>seqs</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="instance_attr_details" class="attr_details">
|
||
|
<h2>Instance Attribute Details</h2>
|
||
|
|
||
|
|
||
|
<span id=""></span>
|
||
|
<div class="method_details first">
|
||
|
<h3 class="signature first" id="members-instance_method">
|
||
|
|
||
|
#<strong>members</strong> ⇒ <tt>Array<<span class='object_link'><a href="Sequence.html" title="Sass::Selector::Sequence (class)">Sequence</a></span>></tt> <span class="extras">(readonly)</span>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>The comma-separated selector sequences represented by this class.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Array<<span class='object_link'><a href="Sequence.html" title="Sass::Selector::Sequence (class)">Sequence</a></span>></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
11
|
||
|
12
|
||
|
13</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 11</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_members'>members</span>
|
||
|
<span class='ivar'>@members</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<div id="instance_method_details" class="method_details_list">
|
||
|
<h2>Instance Method Details</h2>
|
||
|
|
||
|
|
||
|
<div class="method_details first">
|
||
|
<h3 class="signature first" id="contains_parent_ref?-instance_method">
|
||
|
|
||
|
#<strong>contains_parent_ref?</strong> ⇒ <tt>Boolean</tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns whether there's a <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selector anywhere in this sequence.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
45
|
||
|
46
|
||
|
47</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 45</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span>
|
||
|
<span class='ivar'>@members</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_sel'>sel</span><span class='op'>|</span> <span class='id identifier rubyid_sel'>sel</span><span class='period'>.</span><span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span><span class='rbrace'>}</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="do_extend-instance_method">
|
||
|
|
||
|
#<strong>do_extend</strong>(extends, parent_directives = [], replace = false, seen = Set.new, original = true) ⇒ <tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<div class="note todo">
|
||
|
<strong>TODO:</strong>
|
||
|
<div class='inline'>
|
||
|
<p>Link this to the reference documentation on `@extend` when such a thing
|
||
|
exists.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
<p>Non-destrucively extends this selector with the extensions specified in a
|
||
|
hash (which should come from <span class='object_link'><a href="../Tree/Visitors/Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Tree::Visitors::Cssize</a></span>).</p>
|
||
|
|
||
|
<pre class="code ruby"><code class="ruby"><span class='const'>The</span> <span class='id identifier rubyid_extensions'>extensions</span> <span class='id identifier rubyid_to'>to</span> <span class='id identifier rubyid_perform'>perform</span> <span class='id identifier rubyid_on'>on</span> <span class='id identifier rubyid_this'>this</span> <span class='id identifier rubyid_selector'>selector</span>
|
||
|
</code></pre>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>extends</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../Util/SubsetMap.html" title="Sass::Util::SubsetMap (class)">Sass::Util::SubsetMap</a></span>{<span class='object_link'><a href="Simple.html" title="Sass::Selector::Simple (class)">Selector::Simple</a></span> =>
|
||
|
<span class='object_link'><a href="../Tree/Visitors/Cssize/Extend.html" title="Sass::Tree::Visitors::Cssize::Extend (class)">Sass::Tree::Visitors::Cssize::Extend</a></span>}</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>parent_directives</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Array<<span class='object_link'><a href="../Tree/DirectiveNode.html" title="Sass::Tree::DirectiveNode (class)">Sass::Tree::DirectiveNode</a></span>></tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>[]</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The directives containing this selector.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>replace</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>Whether to replace the original selector entirely or include it in the
|
||
|
result.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>seen</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Set<Array<<span class='object_link'><a href="Simple.html" title="Sass::Selector::Simple (class)">Selector::Simple</a></span>>></tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>Set.new</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The set of simple sequences that are currently being replaced.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>original</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>Whether this is the original selector being extended, as opposed to the
|
||
|
result of a previous extension that's being re-extended.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>A copy of this selector, with extensions made according to `extends`</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
70
|
||
|
71
|
||
|
72
|
||
|
73
|
||
|
74
|
||
|
75</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 70</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_do_extend'>do_extend</span><span class='lparen'>(</span><span class='id identifier rubyid_extends'>extends</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_seen'>seen</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span>
|
||
|
<span class='id identifier rubyid_original'>original</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
||
|
<span class='const'><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span>
|
||
|
<span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_do_extend'>do_extend</span><span class='lparen'>(</span><span class='id identifier rubyid_extends'>extends</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span><span class='comma'>,</span> <span class='id identifier rubyid_seen'>seen</span><span class='comma'>,</span> <span class='id identifier rubyid_original'>original</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="inspect-instance_method">
|
||
|
|
||
|
#<strong>inspect</strong> ⇒ <tt>String</tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns a string representation of the sequence. This is basically the
|
||
|
selector string.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>String</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
170
|
||
|
171
|
||
|
172</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 170</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
||
|
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="populate_extends-instance_method">
|
||
|
|
||
|
#<strong>populate_extends</strong>(extends, extendee, extend_node = nil, parent_directives = [], allow_compound_target = false) ⇒ <tt>Object</tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Populates a subset map that can then be used to extend selectors. This
|
||
|
registers an extension with this selector as the extender and `extendee` as
|
||
|
the extendee.</p>
|
||
|
|
||
|
<pre class="code ruby"><code class="ruby">The subset map representing the extensions to perform.
|
||
|
</code></pre>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>extends</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../Util/SubsetMap.html" title="Sass::Util::SubsetMap (class)">Sass::Util::SubsetMap</a></span>{<span class='object_link'><a href="Simple.html" title="Sass::Selector::Simple (class)">Selector::Simple</a></span> =>
|
||
|
<span class='object_link'><a href="../Tree/Visitors/Cssize/Extend.html" title="Sass::Tree::Visitors::Cssize::Extend (class)">Sass::Tree::Visitors::Cssize::Extend</a></span>}</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>extendee</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The selector being extended.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>extend_node</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../Tree/ExtendNode.html" title="Sass::Tree::ExtendNode (class)">Sass::Tree::ExtendNode</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The node that caused this extension.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>parent_directives</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Array<<span class='object_link'><a href="../Tree/DirectiveNode.html" title="Sass::Tree::DirectiveNode (class)">Sass::Tree::DirectiveNode</a></span>></tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>[]</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The parent directives containing `extend_node`.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>allow_compound_target</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>Whether `extendee` is allowed to contain compound selectors.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p class="tag_title">Raises:</p>
|
||
|
<ul class="raise">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>if this extension is invalid.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
104
|
||
|
105
|
||
|
106
|
||
|
107
|
||
|
108
|
||
|
109
|
||
|
110
|
||
|
111
|
||
|
112
|
||
|
113
|
||
|
114
|
||
|
115
|
||
|
116
|
||
|
117
|
||
|
118
|
||
|
119
|
||
|
120
|
||
|
121
|
||
|
122
|
||
|
123
|
||
|
124
|
||
|
125
|
||
|
126
|
||
|
127
|
||
|
128
|
||
|
129
|
||
|
130
|
||
|
131
|
||
|
132
|
||
|
133
|
||
|
134
|
||
|
135
|
||
|
136</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 104</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_populate_extends'>populate_extends</span><span class='lparen'>(</span><span class='id identifier rubyid_extends'>extends</span><span class='comma'>,</span> <span class='id identifier rubyid_extendee'>extendee</span><span class='comma'>,</span> <span class='id identifier rubyid_extend_node'>extend_node</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
||
|
<span class='id identifier rubyid_allow_compound_target'>allow_compound_target</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
||
|
<span class='id identifier rubyid_extendee'>extendee</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span>
|
||
|
<span class='kw'>if</span> <span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>></span> <span class='int'>1</span>
|
||
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Can't extend </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_seq'>seq</span><span class='embexpr_end'>}</span><span class='tstring_content'>: can't extend nested selectors</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span>
|
||
|
|
||
|
<span class='id identifier rubyid_sseq'>sseq</span> <span class='op'>=</span> <span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
||
|
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Selector.html" title="Sass::Selector (module)">Selector</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
|
||
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Can't extend </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_seq'>seq</span><span class='embexpr_end'>}</span><span class='tstring_content'>: invalid selector</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>elsif</span> <span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_ss'>ss</span><span class='op'>|</span> <span class='id identifier rubyid_ss'>ss</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Selector.html" title="Sass::Selector (module)">Selector</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span></span><span class='rparen'>)</span><span class='rbrace'>}</span>
|
||
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Can't extend </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_seq'>seq</span><span class='embexpr_end'>}</span><span class='tstring_content'>: can't extend parent selectors</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span>
|
||
|
|
||
|
<span class='id identifier rubyid_sel'>sel</span> <span class='op'>=</span> <span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span>
|
||
|
<span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_allow_compound_target'>allow_compound_target</span> <span class='op'>&&</span> <span class='id identifier rubyid_sel'>sel</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>1</span>
|
||
|
<span class='cvar'>@@compound_extend_deprecation</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_filename'>filename</span><span class='comma'>,</span> <span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='heredoc_beg'><<WARNING</span><span class='rparen'>)</span>
|
||
|
<span class='tstring_content'>Extending a compound selector, </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sseq'>sseq</span><span class='embexpr_end'>}</span><span class='tstring_content'>, is deprecated and will not be supported in a future release.
|
||
|
Consider "@extend </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_sseq'>sseq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>, </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>" instead.
|
||
|
See https://github.com/sass/sass/issues/1599 for details.
|
||
|
</span><span class='heredoc_end'>WARNING
|
||
|
</span> <span class='kw'>end</span>
|
||
|
|
||
|
<span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_member'>member</span><span class='op'>|</span>
|
||
|
<span class='kw'>unless</span> <span class='id identifier rubyid_member'>member</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Selector.html" title="Sass::Selector (module)">Selector</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SimpleSequence.html" title="Sass::Selector::SimpleSequence (class)">SimpleSequence</a></span></span><span class='rparen'>)</span>
|
||
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_member'>member</span><span class='embexpr_end'>}</span><span class='tstring_content'> can't extend: invalid selector</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span>
|
||
|
|
||
|
<span class='id identifier rubyid_extends'>extends</span><span class='lbracket'>[</span><span class='id identifier rubyid_sel'>sel</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tree.html" title="Sass::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tree/Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tree/Visitors/Cssize.html" title="Sass::Tree::Visitors::Cssize (class)">Cssize</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Tree/Visitors/Cssize/Extend.html" title="Sass::Tree::Visitors::Cssize::Extend (class)">Extend</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
|
||
|
<span class='id identifier rubyid_member'>member</span><span class='comma'>,</span> <span class='id identifier rubyid_sel'>sel</span><span class='comma'>,</span> <span class='id identifier rubyid_extend_node'>extend_node</span><span class='comma'>,</span> <span class='id identifier rubyid_parent_directives'>parent_directives</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span>
|
||
|
<span class='kw'>end</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="resolve_parent_refs-instance_method">
|
||
|
|
||
|
#<strong>resolve_parent_refs</strong>(super_cseq, implicit_parent = true) ⇒ <tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Resolves the <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> selectors within this selector by replacing them with
|
||
|
the given parent selector, handling commas appropriately.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>super_cseq</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The parent selector</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>implicit_parent</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>Whether the the parent selector should automatically be prepended to the
|
||
|
resolved selector if it contains no parent refs.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>This selector, with parent references resolved</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
<p class="tag_title">Raises:</p>
|
||
|
<ul class="raise">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>If a parent selector is invalid</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
28
|
||
|
29
|
||
|
30
|
||
|
31
|
||
|
32
|
||
|
33
|
||
|
34
|
||
|
35
|
||
|
36
|
||
|
37
|
||
|
38
|
||
|
39
|
||
|
40</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 28</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_resolve_parent_refs'>resolve_parent_refs</span><span class='lparen'>(</span><span class='id identifier rubyid_super_cseq'>super_cseq</span><span class='comma'>,</span> <span class='id identifier rubyid_implicit_parent'>implicit_parent</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>if</span> <span class='id identifier rubyid_super_cseq'>super_cseq</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
||
|
<span class='kw'>if</span> <span class='id identifier rubyid_contains_parent_ref?'>contains_parent_ref?</span>
|
||
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
||
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Base-level rules cannot contain the parent-selector-referencing character '&'.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span>
|
||
|
<span class='kw'>return</span> <span class='kw'>self</span>
|
||
|
<span class='kw'>end</span>
|
||
|
|
||
|
<span class='const'><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_flatten_vertically'><span class='object_link'><a href="../Util.html#flatten_vertically-instance_method" title="Sass::Util#flatten_vertically (method)">flatten_vertically</a></span></span><span class='lparen'>(</span><span class='ivar'>@members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span>
|
||
|
<span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_resolve_parent_refs'>resolve_parent_refs</span><span class='lparen'>(</span><span class='id identifier rubyid_super_cseq'>super_cseq</span><span class='comma'>,</span> <span class='id identifier rubyid_implicit_parent'>implicit_parent</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span>
|
||
|
<span class='kw'>end</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="superselector?-instance_method">
|
||
|
|
||
|
#<strong>superselector?</strong>(cseq) ⇒ <tt>Boolean</tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns whether or not this selector matches all elements that the given
|
||
|
selector matches (as well as possibly more).</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
<div class="examples">
|
||
|
<p class="tag_title">Examples:</p>
|
||
|
|
||
|
|
||
|
<pre class="example code"><code>(.foo).superselector?(.foo.bar) #=> true
|
||
|
(.foo).superselector?(.bar) #=> false</code></pre>
|
||
|
|
||
|
</div>
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>cseq</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
85
|
||
|
86
|
||
|
87</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 85</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_superselector?'>superselector?</span><span class='lparen'>(</span><span class='id identifier rubyid_cseq'>cseq</span><span class='rparen'>)</span>
|
||
|
<span class='id identifier rubyid_cseq'>cseq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_seq1'>seq1</span><span class='op'>|</span> <span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_seq2'>seq2</span><span class='op'>|</span> <span class='id identifier rubyid_seq2'>seq2</span><span class='period'>.</span><span class='id identifier rubyid_superselector?'>superselector?</span><span class='lparen'>(</span><span class='id identifier rubyid_seq1'>seq1</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='rbrace'>}</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="to_s-instance_method">
|
||
|
|
||
|
#<strong>to_s</strong>(opts = {}) ⇒ <tt>Object</tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
|
||
|
<p class="tag_title">See Also:</p>
|
||
|
<ul class="see">
|
||
|
|
||
|
<li><span class='object_link'><a href="AbstractSequence.html#to_s-instance_method" title="Sass::Selector::AbstractSequence#to_s (method)">AbstractSequence#to_s</a></span></li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
175
|
||
|
176
|
||
|
177
|
||
|
178
|
||
|
179
|
||
|
180
|
||
|
181
|
||
|
182</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 175</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
||
|
<span class='ivar'>@members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span>
|
||
|
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:placeholder</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='op'>&&</span> <span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_invisible?'>invisible?</span>
|
||
|
<span class='id identifier rubyid_m'>m</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span>
|
||
|
<span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:style</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='symbol'>:compressed</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,</span><span class='tstring_end'>"</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span>
|
||
|
<span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, \n</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>,\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="to_sass_script-instance_method">
|
||
|
|
||
|
#<strong>to_sass_script</strong> ⇒ <tt><span class='object_link'><a href="../Script/Value/List.html" title="Sass::Script::Value::List (class)">Sass::Script::Value::List</a></span></tt>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Returns a SassScript representation of this selector.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../Script/Value/List.html" title="Sass::Script::Value::List (class)">Sass::Script::Value::List</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
157
|
||
|
158
|
||
|
159
|
||
|
160
|
||
|
161
|
||
|
162
|
||
|
163
|
||
|
164</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 157</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_sass_script'>to_sass_script</span>
|
||
|
<span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value/List.html" title="Sass::Script::Value::List (class)">List</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Script/Value/List.html#initialize-instance_method" title="Sass::Script::Value::List#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_seq'>seq</span><span class='op'>|</span>
|
||
|
<span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value/List.html" title="Sass::Script::Value::List (class)">List</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Script/Value/List.html#initialize-instance_method" title="Sass::Script::Value::List#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_seq'>seq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
|
||
|
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_component'>component</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
||
|
<span class='const'><span class='object_link'><a href="../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Script/Value/String.html" title="Sass::Script::Value::String (class)">String</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Script/Value/String.html#initialize-instance_method" title="Sass::Script::Value::String#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='comma'>,</span> <span class='label'>separator:</span> <span class='symbol'>:space</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span><span class='comma'>,</span> <span class='label'>separator:</span> <span class='symbol'>:comma</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<div class="method_details ">
|
||
|
<h3 class="signature " id="unify-instance_method">
|
||
|
|
||
|
#<strong>unify</strong>(other) ⇒ <tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt><sup>?</sup>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</h3><div class="docstring">
|
||
|
<div class="discussion">
|
||
|
|
||
|
<p>Unifies this with another comma selector to produce a selector that matches
|
||
|
(a subset of) the intersection of the two inputs.</p>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="tags">
|
||
|
<p class="tag_title">Parameters:</p>
|
||
|
<ul class="param">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
<span class='name'>other</span>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
<p class="tag_title">Returns:</p>
|
||
|
<ul class="return">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></tt>, <tt>nil</tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>The unified selector, or nil if unification failed.</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
<p class="tag_title">Raises:</p>
|
||
|
<ul class="raise">
|
||
|
|
||
|
<li>
|
||
|
|
||
|
|
||
|
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
|
||
|
|
||
|
|
||
|
|
||
|
—
|
||
|
<div class='inline'>
|
||
|
<p>If this selector cannot be unified. This will only ever occur when a
|
||
|
dynamic selector, such as <span class='object_link'><a href="Parent.html" title="Sass::Selector::Parent (class)">Parent</a></span> or Interpolation, is used in
|
||
|
unification. Since these selectors should be resolved by the time extension
|
||
|
and unification happen, this exception will only ever be raised as a result
|
||
|
of programmer error</p>
|
||
|
</div>
|
||
|
|
||
|
</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
</div><table class="source_code">
|
||
|
<tr>
|
||
|
<td>
|
||
|
<pre class="lines">
|
||
|
|
||
|
|
||
|
149
|
||
|
150
|
||
|
151
|
||
|
152</pre>
|
||
|
</td>
|
||
|
<td>
|
||
|
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/selector/comma_sequence.rb', line 149</span>
|
||
|
|
||
|
<span class='kw'>def</span> <span class='id identifier rubyid_unify'>unify</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
||
|
<span class='id identifier rubyid_results'>results</span> <span class='op'>=</span> <span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_seq1'>seq1</span><span class='op'>|</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_seq2'>seq2</span><span class='op'>|</span> <span class='id identifier rubyid_seq1'>seq1</span><span class='period'>.</span><span class='id identifier rubyid_unify'>unify</span><span class='lparen'>(</span><span class='id identifier rubyid_seq2'>seq2</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
|
||
|
<span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='kw'>nil</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="" title="Sass::Selector::CommaSequence (class)">CommaSequence</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Sass::Selector::CommaSequence#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_results'>results</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_cseq'>cseq</span><span class='op'>|</span> <span class='id identifier rubyid_cseq'>cseq</span><span class='period'>.</span><span class='id identifier rubyid_members'>members</span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='rparen'>)</span>
|
||
|
<span class='kw'>end</span></pre>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<div id="footer">
|
||
|
Generated on Mon Oct 22 13:20:56 2018 by
|
||
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
||
|
0.9.12 (ruby-2.5.3).
|
||
|
</div>
|
||
|
<script>
|
||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||
|
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||
|
|
||
|
ga('create', 'UA-535380-14', 'sass-lang.com');
|
||
|
ga('send', 'pageview');
|
||
|
</script>
|
||
|
|
||
|
</body>
|
||
|
</html>
|