Sha256: 901c2cd51759657598d25f631ca13f55c5848b8e9a3369e8f41f3f00a1bc1631

Contents?: true

Size: 1.49 KB

Versions: 7

Compression:

Stored size: 1.49 KB

Contents

// sass.hpp must go before all system headers to get the
// __EXTENSIONS__ fix on Solaris.
#include "sass.hpp"

#include "ast_helpers.hpp"
#include "extension.hpp"
#include "ast.hpp"

namespace Sass {

  // ##########################################################################
  // Static function to create a copy with a new extender
  // ##########################################################################
  Extension Extension::withExtender(const ComplexSelectorObj& newExtender) const
  {
    Extension extension(newExtender);
    extension.specificity = specificity;
    extension.isOptional = isOptional;
    extension.target = target;
    return extension;
  }

  // ##########################################################################
  // Asserts that the [mediaContext] for a selector is
  // compatible with the query context for this extender.
  // ##########################################################################
  void Extension::assertCompatibleMediaContext(CssMediaRuleObj mediaQueryContext, Backtraces& traces) const
  {

    if (this->mediaContext.isNull()) return;

    if (mediaQueryContext && ObjPtrEqualityFn(mediaContext->block(), mediaQueryContext->block())) return;

    if (ObjEqualityFn<CssMediaRuleObj>(mediaQueryContext, mediaContext)) return;

    throw Exception::ExtendAcrossMedia(traces, *this);

  }

  // ##########################################################################
  // ##########################################################################

}

Version data entries

7 entries across 6 versions & 4 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/sassc-2.4.0/ext/libsass/src/extension.cpp
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/sassc-2.4.0/ext/libsass/src/extension.cpp
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/sassc-2.4.0/ext/libsass/src/extension.cpp
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass/src/extension.cpp
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass/src/extension.cpp
sassc-2.4.0 ext/libsass/src/extension.cpp
sassc-2.3.0 ext/libsass/src/extension.cpp