Skip to content
This repository was archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from rashidkpc/pr/1999
Browse files Browse the repository at this point in the history
Tweak CSS, change em to mark
  • Loading branch information
lukasolson committed Nov 21, 2014
2 parents 9aed294 + c76a72e commit 4d52fb5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/kibana/components/highlight/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ define(function (require) {

// Replace all highlight tags with proper html tags
var tagged = section
.split(highlightTags.pre).join('<em>')
.split(highlightTags.post).join('</em>');
.split(highlightTags.pre).join('<mark>')
.split(highlightTags.post).join('</mark>');

// Replace all instances of the untagged string with the properly tagged string
formatted = formatted.split(untagged).join(tagged);
Expand Down
18 changes: 4 additions & 14 deletions src/kibana/styles/_table.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,26 @@ kbn-table,tbody[kbn-rows] {
}
}

tr.even td {
background-color: #f1f1f1;
}

td.numeric-value {
text-align: right;
padding-right: 15px;
}

dl.source {
line-height: 2em;
margin-bottom: 0;
line-height: 2em;

dt {
display: inline;
background: #ECECEC;
padding: 0.15em 0.2em 0.15em 0.7em;
margin-right: 0.3em;
font-weight: bold;
color: #5F5F5F;
background: @gray-lighter;
padding: @padding-xs-vertical @padding-xs-horizontal;
margin-right: @padding-xs-horizontal;
font-family: monospace;
}

dd {
display: inline;
margin-right: 0.75em;
}
}

td em {
background-color: yellow;
}
}
12 changes: 6 additions & 6 deletions test/unit/specs/components/highlight/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ define(function (require) {
tags.pre + 'hamburger' + tags.post + ' alcatra cupim. Salami capicola boudin pork belly shank picanha.'
];
var result = filter(text, highlights);
expect(result.indexOf('<em>hamburger</em>')).to.be.greaterThan(-1);
expect(result.split('<em>hamburger</em>').length).to.be(text.split('hamburger').length);
expect(result.indexOf('<mark>hamburger</mark>')).to.be.greaterThan(-1);
expect(result.split('<mark>hamburger</mark>').length).to.be(text.split('hamburger').length);
});

it('should highlight multiple results', function () {
Expand All @@ -39,8 +39,8 @@ define(function (require) {
'Chicken' + tags.post + ' cow beef picanha. Picanha'
];
var result = filter(text, highlights);
expect(result.indexOf('<em>Chicken</em>')).to.be.greaterThan(-1);
expect(result.split('<em>Chicken</em>').length).to.be(text.split('Chicken').length);
expect(result.indexOf('<mark>Chicken</mark>')).to.be.greaterThan(-1);
expect(result.split('<mark>Chicken</mark>').length).to.be(text.split('Chicken').length);
});

it('should highlight multiple hits in a result', function () {
Expand All @@ -55,8 +55,8 @@ define(function (require) {
'belly shank picanha.'
];
var result = filter(text, highlights);
expect(result.indexOf('<em>pork</em>')).to.be.greaterThan(-1);
expect(result.split('<em>pork</em>').length).to.be(text.split('pork').length);
expect(result.indexOf('<mark>pork</mark>')).to.be.greaterThan(-1);
expect(result.split('<mark>pork</mark>').length).to.be(text.split('pork').length);
});

it('should accept an object and return a string containing its properties', function () {
Expand Down

0 comments on commit 4d52fb5

Please sign in to comment.