Commit 7ec94653 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Move enum box styles to @enum Tag class.

parent 0c4bb6f4
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -7,6 +7,14 @@ module JsDuck::Tag
      @tagname = :enum
      @merge_context = :class
      @html_position = POS_ENUM
      # Green box
      @css = <<-EOCSS
        .enum-box {
          color: #060;
          background-color: #efe;
          text-align: center;
        }
      EOCSS
    end

    # @enum {Type} [name=default] ...
@@ -40,16 +48,20 @@ module JsDuck::Tag
      if cls[:enum][:doc_only]
        first = cls[:members][:property][0] || {:name => 'foo', :default => '"foo"'}
        [
          "<p class='enum'><strong>ENUM:</strong> ",
          "<div class='rounded-box enum-box'>",
          "<p><strong>ENUM:</strong> ",
          "This enumeration defines a set of String values. ",
          "It exists primarily for documentation purposes - ",
          "in code use the actual string values like #{first[:default]}, ",
          "don't reference them through this class like #{cls[:name]}.#{first[:name]}.</p>",
          "</div>",
        ]
      else
        [
          "<p class='enum'><strong>ENUM:</strong> ",
          "<div class='rounded-box enum-box'>",
          "<p><strong>ENUM:</strong> ",
          "This enumeration defines a set of #{cls[:enum][:type]} values.</p>",
          "</div>",
        ]
      end
    end
+0 −7
Original line number Diff line number Diff line
@@ -60,13 +60,6 @@
    @include guides-h3-heading; } }

.class-overview {
  p.enum {
    border: 1px solid #999;
    @include border-radius(5px);
    color: #060;
    background-color: #efe;
    padding: 10px 50px;
    text-align: center; }
  .signature span {
    font-weight: bold;
    text-transform: uppercase;