Skip to content

The content of [stylesheet] passages are not injected into story's stylesheet  #62

@ghost

Description

I am currently using Gulp to make my worflow in Twee2 easier. The problem is, twee2's build isn't injecting scripts and stylesheets as expected with the language's syntax.

The Gulp tasks, in the end, produce a dist directory:

dist
  ⊢ scripts.tw2
  ⊢ story.html
  ⊢ story.tw2
  ∟ stylesheets.tw2
// dist/scripts.tw2

::StoryTitle
Escape from Earth

::Start
There are only hours left before the asteroid hits and, if the news is to be believed, all life on Earth is extinguished. The spaceship is fuelled-up and [[ready to go->Ready]], but after all the rush of the last few weeks, you don't feel like you've had a chance to say goodbye to the planet that's been your home your entire life. [[Your father->Father]] glances over to check that you're heading into the vessel as he shepherds [[the family dog->Dog]]'s out of the hangar door. Behind the barriers, [[your sister->Sister]] gives a sad wave, clutching a photo in her hand.

::StoryIncludes
scripts.tw2
stylesheets.tw2
// dist/stylesheets.tw2

::StyleSheets [scss stylesheet]

* {
    box-sizing: border-box;
}

body {
  margin: 0;
  background: #eee;
}

tw-passage tw-link {
  color: red;
}

.test {
    font-size: 1rem;
}

The resulting HTML with no injected secondary files:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions