parameters: (self)
return_statement: return '\n'.join(text) + '\n'
docstring: Get css.
docstring_summary: Get css.
docstring_tokens: Get css .
function: def get_css(self):
          """Get css."""
  
          # Intialize colors with the global foreground, background, and fake html_border
          colors = OrderedDict()
          colors['.foreground'] = OrderedDict([('color', self.fground)])
          colors['.background'] = OrderedDict([('background-color', self.bground)])
  
          # Assemble the rest of the CSS
          for tscope in sorted(all_scopes):
              scope = self.guess_style(tscope, explicit_background=True)
              key_scope = '.' + tscope
              color = scope.fg_simulated
              bgcolor = scope.bg_simulated
              if color or bgcolor:
                  colors[key_scope] = OrderedDict()
                  if color:
                      colors[key_scope]['color'] = color
                  if bgcolor:
                      colors[key_scope]['background-color'] = bgcolor
  
                  for s in scope.style.split(' '):
                      if "bold" in s:
                          colors[key_scope]['font-weight'] = 'bold'
                      if "italic" in s:
                          colors[key_scope]['font-style'] = 'italic'
                      if "underline" in s and False:  # disabled
                          colors[key_scope]['text-decoration'] = 'underline'
  
          text = []
          css_entry = '%s { %s}'
          for k, v in colors.items():
              text.append(css_entry % (k, ''.join(['%s: %s;' % (k1, v1) for k1, v1 in v.items()])))
  
          return '\n'.join(text) + '\n'
function_tokens: def get_css ( self ) : # Intialize colors with the global foreground, background, and fake html_border colors = OrderedDict ( ) colors [ '.foreground' ] = OrderedDict ( [ ( 'color' , self . fground ) ] ) colors [ '.background' ] = OrderedDict ( [ ( 'background-color' , self . bground ) ] ) # Assemble the rest of the CSS for tscope in sorted ( all_scopes ) : scope = self . guess_style ( tscope , explicit_background = True ) key_scope = '.' + tscope color = scope . fg_simulated bgcolor = scope . bg_simulated if color or bgcolor : colors [ key_scope ] = OrderedDict ( ) if color : colors [ key_scope ] [ 'color' ] = color if bgcolor : colors [ key_scope ] [ 'background-color' ] = bgcolor for s in scope . style . split ( ' ' ) : if "bold" in s : colors [ key_scope ] [ 'font-weight' ] = 'bold' if "italic" in s : colors [ key_scope ] [ 'font-style' ] = 'italic' if "underline" in s and False : # disabled colors [ key_scope ] [ 'text-decoration' ] = 'underline' text = [ ] css_entry = '%s { %s}' for k , v in colors . items ( ) : text . append ( css_entry % ( k , '' . join ( [ '%s: %s;' % ( k1 , v1 ) for k1 , v1 in v . items ( ) ] ) ) ) return '\n' . join ( text ) + '\n'