Commit a30f3eaa authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Move all signature styles to Tag classes.

parent 790cae70
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ module JsDuck::Tag
    def initialize
      @pattern = "chainable"
      @signature = {:long => "chainable", :short => ">"} # show small right-arrow
      @css = ".signature .chainable { background-color: #00aa00 }" # green
      super
    end
  end
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ module JsDuck::Tag
  class Deprecated < DeprecatedTag
    def initialize
      @tagname = :deprecated
      @css = ".signature .deprecated { background-color: #aa0000 }" # red
      super
    end
  end
+7 −1
Original line number Diff line number Diff line
@@ -4,9 +4,15 @@ module JsDuck::Tag
  class New < BooleanTag
    def initialize
      @pattern = "new"
      # unicode black star char
      # A :tooltip field gets injected to this signature in Process::Versions
      @signature = {:long => "&#9733;", :short => "&#9733;"}
      # black (docs text color) unicode star on yellow background
      @css = <<-EOCSS
        .signature .new {
          color: #484848;
          background-color: #F5D833;
        }
      EOCSS
      super
    end
  end
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ module JsDuck::Tag
      @pattern = "private"
      @signature = {:long => "private", :short => "PRI"}
      @html_position = POS_PRIVATE
      @css = ".signature .private { background-color: #FD6B1B }" # Orange
      super
    end

+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ module JsDuck::Tag
    def initialize
      @pattern = "protected"
      @signature = {:long => "protected", :short => "PRO"}
      @css = ".signature .protected { background-color: #9B86FC }" # Violet
      super
    end
  end
Loading