Skip to content

Commit 27d5026

Browse files
committed
Remove raw css imports
This is a non-standard, and confusion feature. Implementors can now opt into supporting @import'ing additional file extentions with `sass_option_push_import_extension`.
1 parent 6fe62e9 commit 27d5026

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

src/file.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ namespace Sass {
323323
// (2) underscore + given
324324
// (3) underscore + given + extension
325325
// (4) given + extension
326-
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts, const std::vector<std::string>& d_exts)
326+
std::vector<Include> resolve_includes(const std::string& root, const std::string& file, const std::vector<std::string>& exts)
327327
{
328328
std::string filename = join_paths(root, file);
329329
// split the filename
@@ -342,25 +342,13 @@ namespace Sass {
342342
for(auto ext : exts) {
343343
rel_path = join_paths(base, "_" + name + ext);
344344
abs_path = join_paths(root, rel_path);
345-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
345+
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, ext == ".css" });
346346
}
347347
// next test plain name with exts
348348
for(auto ext : exts) {
349349
rel_path = join_paths(base, name + ext);
350350
abs_path = join_paths(root, rel_path);
351-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path });
352-
}
353-
// next test d_exts plus underscore
354-
for(auto ext : d_exts) {
355-
rel_path = join_paths(base, "_" + name + ext);
356-
abs_path = join_paths(root, rel_path);
357-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
358-
}
359-
// next test plain name with d_exts
360-
for(auto ext : d_exts) {
361-
rel_path = join_paths(base, name + ext);
362-
abs_path = join_paths(root, rel_path);
363-
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, true });
351+
if (file_exists(abs_path)) includes.push_back({{ rel_path, root }, abs_path, ext == ".css" });
364352
}
365353
// nothing found
366354
return includes;

src/file.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ namespace Sass {
127127
namespace File {
128128

129129
static std::vector<std::string> defaultExtensions = { ".scss", ".sass" };
130-
static std::vector<std::string> deprecatedExtensions = { ".css" };
131130

132131
std::vector<Include> resolve_includes(const std::string& root, const std::string& file,
133-
const std::vector<std::string>& exts = defaultExtensions,
134-
const std::vector<std::string>& d_exts = deprecatedExtensions);
132+
const std::vector<std::string>& exts = defaultExtensions);
133+
135134

136135
}
137136

0 commit comments

Comments
 (0)