Style in a content with sass

0

I have the following code in sass that I use when I generate a pdf with django.

@page {
  size: a4 portait;
  margin: 1cm;
  margin-top: 3.5cm;
  margin-bottom: 2cm;
  overflow: hidden;

  @top-center {
    height: 96px;
    width: 700px;
    content: " ";
    margin-bottom: 1px;
    margin-left: -2px;
  }

  @bottom-center {
    font-family: sans-serif;
    font-size: 10px;
    color: #8DCD75;
    margin: 0 3em;
    content: "Direccion: una calle"

  }
}

I have since in the content of @ bottom-center everything appears in green, # 8DCD75, what I would like to do is, for example, that only the word Address, appear in red.

Is there any way to do that?

    
asked by Danik 24.03.2017 в 11:05
source

1 answer

0

Try the pseudo elements, divide the text into two parts with different colors:

span:before {
  content: "Direccion:";
  color: #FF0000;
}

span:after {
  content: " una calle";
  color: #8DCD75;
}
Cualquier texto <span></span>

It's a matter of accommodating it to what you have.

    
answered by 24.03.2017 в 12:00